Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-325

Creating a QWidget without a QApplication causes Python interpreter to quit.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Duplicate
    • Affects Version/s: 1.2.x, dev
    • Fix Version/s: dev
    • Component/s: PySide
    • Labels:
    • Environment:
      Windows 7 64bit,
      Python: Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:32:19) [MSC v.1500 32 bit (Intel)] on win32
      >>> PySide.__version__
      '1.2.4'

      Description

      I hope I am reporting this right, anyway. When in the Python Interpreter. If you attempt to create a QWidget before a QApplication, you get the following error. AND the interpreter quits. I would have expected an exception to be raised and the interpreter to stay open. It is only a minor annoyance, and really one should only get bit once by this.

      e.g.
      C:\Temp>python
      Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:32:19) [MSC v.1500 32 bit (Intel)] on win32
      Type "help", "copyright", "credits" or "license" for more information.
      >>> from PySide import QtGui, QtCore
      >>> myWidget = QtGui.QWidget()
      QWidget: Must construct a QApplication before a QPaintDevice

      C:\Temp>

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              ctismer Christian Tismer
              Reporter:
              busfault Thomas Middleton
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes