diff options
Diffstat (limited to 'PySide/QtDeclarative')
-rw-r--r-- | PySide/QtDeclarative/pysideqmlregistertype.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/PySide/QtDeclarative/pysideqmlregistertype.cpp b/PySide/QtDeclarative/pysideqmlregistertype.cpp index 1fc802012..7dfd7a622 100644 --- a/PySide/QtDeclarative/pysideqmlregistertype.cpp +++ b/PySide/QtDeclarative/pysideqmlregistertype.cpp @@ -113,6 +113,9 @@ int PySide::qmlRegisterType(PyObject* pyObj, const char* uri, int versionMajor, QMetaObject* metaObject = reinterpret_cast<QMetaObject*>(ObjectType::getTypeUserData(reinterpret_cast<SbkObjectType*>(pyObj))); Q_ASSERT(metaObject); + // Inc ref the type object, don't worry about dec ref them because there's no way to unregister a QML type + Py_INCREF(pyObj); + // All ready... now the ugly code begins... :-) pyTypes[nextType] = pyObj; |