Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

How to access C++ type from JavaScript code?

$
0
0
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?

Viewing all articles
Browse latest Browse all 4972

Trending Articles