I can't catch why:
- Have a c++ constructor realization
Class::Constructor (QObject *parent) : QObject(parent)
{
...
qDebug() << parent;
}
The Class is inherited from QObject and contains Q_OBJECT macro as well.
in main.cpp I have registered a QML type for Class:
qmlRegisterType<>(Blablabla...)in QML separate
module.qmlI have an implementation:
import blablbla 1.0
Blablabla
{
id: abc
console.log(parent)
}
Everything works fine, but console.log gives me the real parent object (not null), while qDebug() gives me null. What's about QObject hierarchy here?
P.S. the module.qml object is created via js QtCreateComponent -> createObject(parent, args)