@@ -416,9 +416,12 PyObject* PythonQtPrivate::wrapPtr(void* ptr, const QByteArray& name) | |||||
416 | QObject* qptr = (QObject*)ptr; |
|
416 | QObject* qptr = (QObject*)ptr; | |
417 | // if the object is a derived object, we want to switch the class info to the one of the derived class: |
|
417 | // if the object is a derived object, we want to switch the class info to the one of the derived class: | |
418 | if (name!=(qptr->metaObject()->className())) { |
|
418 | if (name!=(qptr->metaObject()->className())) { | |
|
419 | info = _knownClassInfos.value(qptr->metaObject()->className()); | |||
|
420 | if (!info) { | |||
419 | registerClass(qptr->metaObject()); |
|
421 | registerClass(qptr->metaObject()); | |
420 | info = _knownClassInfos.value(qptr->metaObject()->className()); |
|
422 | info = _knownClassInfos.value(qptr->metaObject()->className()); | |
421 | } |
|
423 | } | |
|
424 | } | |||
422 | wrap = createNewPythonQtInstanceWrapper(qptr, info); |
|
425 | wrap = createNewPythonQtInstanceWrapper(qptr, info); | |
423 | // mlabDebugConst("MLABPython","new qobject wrapper added " << " " << wrap->_obj->className() << " " << wrap->classInfo()->wrappedClassName().latin1()); |
|
426 | // mlabDebugConst("MLABPython","new qobject wrapper added " << " " << wrap->_obj->className() << " " << wrap->classInfo()->wrappedClassName().latin1()); | |
424 | return (PyObject*)wrap; |
|
427 | return (PyObject*)wrap; |
General Comments 0
You need to be logged in to leave comments.
Login now