Advantage of declaring a QML module with qt_add_library over just using qt_add_qml_module
Unsolved
QML and Qt Quick
-
Hello,
I'm following up on another question I posted about structuring a C++/QML project and trying to understand the advantages or differences of declaring a QML module as a library in CMake over just using qt_add_qml_module.
That is, when to useqt_add_library( MyExtraModule STATIC) # in the module's CMake
and linking to MyExtraModuleplugin in the MainModule target libraries?
And what is the use/need of this declaration in that case?
Q_IMPORT_QML_PLUGIN( MyExtraModulePlugin );
It works with and without, so I'm missing the point.
There are a lot of examples circulating online, for various versions of Qt and all of this has changed quite a lot. The documentation being pretty thick, it's not easy to find up-to-date basic guidelines.Thanks in advance!