Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Best way to use custom QML-Plugins in applications?
I have to write several qml-Plugins which I will use from different applications.
I already saw the QQmlExtensionPlugin Class (QQmlExtensionPlugin Class) but I would prefer a static way.
Of course I can just import my source files and call all the qmlRegisterType functions manually but maybe there is a recommended way?
@themts What do you mean by static way ? AFAIK
QQmlExtensionPluginis the recommended way.
If I understand QQmlExtensionPlugin correctly, it is a plugin interface class to load qml extensions which are already compiled. So I would create a plugin project, compile it and load it dynamically by me application.
I don't want to compile it to a binary, I want to compile it with my application.
Would I use the QQmlExtensionPlugin class anyway and call registerTypes myself?
Ok, I found something in the docs:
@themts Good find. Seems suitable for your requirement.