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

Cannot destroy QApplication singleton

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P2: Important
    • None
    • 5.14.0
    • PySide
    • None
    • Windows 10 Pro 1909 (Build 18363.535)
      Python 3.6.8 64-bit
    • Windows

    Description

      I can't seem to destroy a QApplication instance using del operator or quit() using PySide2 5.14.0.

      Here is a sample Python program to reproduce the issue:

      import sys
      from PySide2.QtWidgets import *
      
      app = QApplication(sys.argv)
      label = QLabel("Hello World")
      label.show()
      app.exec_()
      
      del app
      
      app = QApplication(sys.argv)
      label = QLabel("Hello World")
      label.show()
      app.exec_()
      
      sys.exit()

       I get an error saying:

      "RuntimeError: Please destroy the QApplication singleton before creating a new QApplication instance."

      PyQt5 works without an error using this same code.

      Attachments

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

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            canol canol
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes