I defined my QObject-derived class with qmlRegisterType.
After that I try to use this type in JS code like this:
console.log(typeof MyQObject)
or
if (obj instanceof MyQObject) ...
and this didn’t work.
There is an error during execution:
qrc:///qml/main.qml:19: TypeError: Type error
How can I use C++ type in JS code?
↧