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

RuntimeError when using multiple inheritance with a subclass of QDialog with PySide 6.9.0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.9.0
    • PySide
    • None

      Starting with PySide6 version 6.9.0, PySide will throw a RuntimeError when using multiple inheritance with a subclass of QDialog. 

       

      Minimal reproducible example:

      import sys
      from PySide6.QtCore import Signal
      from PySide6.QtWidgets import QApplication, QDialog, QMainWindowclass 
      
      DialogSubclass(QDialog): ...
      
      class MainWindow(QMainWindow, DialogSubclass):
          test_signal = Signal()
      
          def __init__(self):
              super().__init__()
              self.test_signal.emit() # throws "RuntimeError: Signal source has been deleted"
      
      if __name__ == "__main__":
          app = QApplication(sys.argv)
          window = MainWindow()
          window.show()
          sys.exit(app.exec())

       

      Note that inheriting from QDialog in MainWindow directly would not throw this error:

      ...
      class MainWindow(QMainWindow, QDialog):
      ...

       

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

            crmaurei Cristian Maureira-Fredes
            c.stolle Christian Stolle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes