CQtDeployer
CQtDeployer copied to clipboard
Deploy application with custom QML library/plugin
I build a test application with the linked QML library on ubuntu 22.0.4. When I launch the application I get the error:
QQmlApplicationEngine failed to load component
qrc:/ExampleProjectApp/example/qml/example.qml:13:5: TkItemControls is not a type
I tried to set the parameters -libDir, -extraLibs, -extraPlugin but it didn’t help.
Test app sources: https://github.com/avkochekov/QmlCommonUiLib Deploy log: deploy.log
i was checked your example, and found some issues with project structure, that cannot, allow deploying your plugin, and i found issue that i need to make a simple research to found solution. Unfortunate, i need more time (except my work time) to prepare an understandable answer and example.
As an alternative, i recommend use simple dynamic library for external qml modules instead qml/qt plugins. It works as a usual shared or static library. (its my way to use qml) you can see example on my other projects.
For example here:
- qml library with one widget Credits. https://github.com/QuasarApp/Credits
- and include this library on another my project https://github.com/QuasarApp/CheatCard/blob/main/src/GUI/CMakeLists.txt#L47
This way competability with many qt version qt5/qt6 instand new cmake macrosses from qt that works only with qt6, and do incomprehensible magick with your project.
i will try to prepare exampe to you that you can make deployable qml plugins that was generated with qt_add_qml_plugin. But on the first look you need to separatly your plugin into external target (lib - not executable).
i close this issue, because it is inactive