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

QML & qmlRegisterType

$
0
0
Hi there, i’m a bit confused with qml type registering and QObject-derived objects. In my case, i would like to use QToolBox in my QML GUI. EDIT : My bad, QToolBox is a QWidget-derived object… How am i supposed to do this ? I tried a basic :     qmlRegisterType<QToolBox>("MyQMLObjects.MyToolBox", 1, 0, "QToolBox"); in my main.cpp before importing in my main.qml : import MyQMLObjects.MyToolBox 1.0; And here it asks me plenty of weird message i usually had when i have MOC Problems. (You see, it’s kinda “_Qfbksdqbgflsdfjqùm21 not found in moc_dummy.cpp at line 42.”) So, my question is : Can i expose QtWidgets such as QToolBox, QMenu… in QML ?

Viewing all articles
Browse latest Browse all 4972

Trending Articles