diff options
Diffstat (limited to 'PySide/typesystem_templates.xml')
-rw-r--r-- | PySide/typesystem_templates.xml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/PySide/typesystem_templates.xml b/PySide/typesystem_templates.xml index e2e6fc4a8..959fe7e20 100644 --- a/PySide/typesystem_templates.xml +++ b/PySide/typesystem_templates.xml @@ -181,5 +181,11 @@ %RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(%1, %2, %3, %4, %5); %PYARG_0 = Shiboken::makeTuple(retval_, %4); </template> + + <template name="set_qapp_parent_for_orphan"> + Shiboken::SbkBaseWrapper* _pySelf = reinterpret_cast<Shiboken::SbkBaseWrapper*>(%PYARG_0); + if (!_pySelf->parentInfo) + Shiboken::setParent(%CONVERTTOPYTHON[QApplication*](qApp), %PYARG_0); + </template> </typesystem> |