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>
File "./test.py", line 21, in toggle
File "./test.py", line 16, in getSplitter
RuntimeError: Internal C++ object (PySide.QtGui.QTextEdit) already deleted.
With PyQt4 (and PyQt5), this works correctly.