Import custom QML item from external library (cmake)
Unsolved
QML and Qt Quick
-
I created a library with some QML items.
From application main.cpp file which uses that library I can load those items by:qmlRegisterType<MyClassCpp>("MyClass", 1, 0, "MyItem1");
Then they can be used in QML files through
import
statementBut how to avoid loading all those items from main.cpp, and just import them in QML.
I read:
http://doc.qt.io/qt-5/qtqml-tutorials-extending-qml-example.html
and
http://doc.qt.io/qt-5/qtqml-modules-cppplugins.html
But I dont know how to do this with cmake.Please help