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

Segmentation Fault with nested layouts

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 6.6.2
    • Other
    • None
    • Fedora Linux,
    • Linux/X11

    Description

      The following minimal example (based on a file that originated long time ago with designer-qt, but kept being updated and modified) leads to a segfault:

      from PyQt6 import QtWidgets
      
      class MyDialog(QtWidgets.QDialog):
          def __init__(self, parent=None):
              super().__init__(parent)
      
              self.layout_1 = QtWidgets.QVBoxLayout(self)
              self.groupbox = QtWidgets.QGroupBox(parent=self)
              self.layout_2 = QtWidgets.QVBoxLayout(self.groupbox)
              self.layout_1.addWidget(self.groupbox)
      
              self.layout_2.insertWidget(1, QtWidgets.QLabel("aaa"))
      
      
      def main():
          import sys
          qt_app = QtWidgets.QApplication(sys.argv)
      
          window = MyDialog()
      
          window.show()
      
          qt_app.exec()
          qt_app.exit()
      
      
      if __name__ == "__main__":
          main()
      

      Attachments

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

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            marmarta Marta Marczykowska-Górecka
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes