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

QTabWidget.clear() deletes child items

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 1.2.0, dev
    • Fix Version/s: 5.6
    • Component/s: PySide
    • Labels:
    • Environment:
      Debian GNU/Linux unstable
    • Commits:
      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. pyside-213-test.py
          0.7 kB
        2. test.py
          0.7 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes