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

QTabWidget.clear() deletes child items

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.6
    • 1.2.0
    • PySide
    • Debian GNU/Linux unstable
    • 27e24a733b8a65623683b00c0764ef00d05fa397

    Description

      According to the Qt documentation, QTabWidget::clear()

      Removes all the pages, but does not delete them.

      However, in PySide the pages and their contents are deleted.

      The test case is attached. Currently it produces this traceback:

      Traceback (most recent call last):
        File "./test.py", line 27, in <module>
          window.toggle()
        File "./test.py", line 21, in toggle
          self.getSplitter()
        File "./test.py", line 16, in getSplitter
          splitter.addWidget(self.editBox)
      RuntimeError: Internal C++ object (PySide.QtGui.QTextEdit) already deleted.
      

      With PyQt4 (and PyQt5), this works correctly.

      Attachments

        1. test.py
          0.7 kB
        2. pyside-213-test.py
          0.7 kB

        Activity

          People

            Unassigned Unassigned
            mandriver Dmitry Shachnev
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: