diff options
Diffstat (limited to 'PySide')
-rw-r--r-- | PySide/QtGui/typesystem_gui_common.xml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml index 5017a4e7f..c178d1844 100644 --- a/PySide/QtGui/typesystem_gui_common.xml +++ b/PySide/QtGui/typesystem_gui_common.xml @@ -5827,9 +5827,13 @@ </modify-argument> </modify-function> <modify-function signature="setWidget(QWidget*)"> - <modify-argument index="1"> - <reference-count action="set"/> - </modify-argument> + <inject-code> + QWidget* _old = %CPPSELF.widget(); + if (_old) + Shiboken::Object::setParent(NULL, %CONVERTTOPYTHON[QWidget*](_old)); + %CPPSELF.%FUNCTION_NAME(%1); + Shiboken::Object::setParent(%PYSELF, %PYARG_1); + </inject-code> </modify-function> </object-type> <!-- a QObject so main-thread delete redundant --> |