aboutsummaryrefslogtreecommitdiffstats
path: root/PySide
diff options
context:
space:
mode:
Diffstat (limited to 'PySide')
-rw-r--r--PySide/QtGui/typesystem_gui_common.xml6
1 files changed, 6 insertions, 0 deletions
diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml
index ab97ee15f..fe5221134 100644
--- a/PySide/QtGui/typesystem_gui_common.xml
+++ b/PySide/QtGui/typesystem_gui_common.xml
@@ -4844,6 +4844,12 @@
<modify-function signature="clear()">
<inject-code class="target" position="beginning">
+ Shiboken::BindingManager&amp; bm = Shiboken::BindingManager::instance();
+ SbkObject* pyRoot = bm.retrieveWrapper(%CPPSELF.invisibleRootItem());
+ if (pyRoot) {
+ Shiboken::Object::destroy(pyRoot, %CPPSELF.invisibleRootItem());
+ }
+
for(int r=0, r_max = %CPPSELF.rowCount(); r &lt; r_max; r++) {
QList&lt;QStandardItem *&gt; ri = %CPPSELF.takeRow(0);