From 1cea6192fa32fee29ae64cdc2bda1414e6a443bd Mon Sep 17 00:00:00 2001 From: John Ehresman Date: Mon, 18 Jun 2012 17:52:22 -0400 Subject: Invalidate invisibleRootItem in clear() method Fixes PYSIDE-56 Change-Id: If0529a289e6d9613fdd85bd9d37ccf438d4e92ca Reviewed-by: Hugo Parente Lima --- PySide/QtGui/typesystem_gui_common.xml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'PySide') 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 @@ + Shiboken::BindingManager& 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 < r_max; r++) { QList<QStandardItem *> ri = %CPPSELF.takeRow(0); -- cgit v1.2.3