[Qbs] Application with QML_ELEMENT in library, problem with plugins.qmltypes
Christian Kandeler
christian.kandeler at qt.io
Tue May 14 13:43:52 CEST 2024
On 5/14/24 10:11 AM, Stéphane Fabry wrote:
> -> i took the "plugins.qmltypes" located in "Release_Desktop__6bebb707edc597ff\carlib.83bede55" and copy paste manually in the app build dir ("Release_Desktop__6bebb707edc597ff\app.7d104347") and there it is working.
>
> But i have no clue on how to ask the library to build/install/deploy its own qmltypes in the build directory of the application :/
You need to arrange this yourself by defining suitable *install*
locations that are shared among the products involved, e.g. via a
project-level property.
So if the application and the qmltypes file have to be at the same
location (surely that's not the canonical way? but I'm not a QML
expert), then they need to get the same qbs.installDir value. Installing
the .qmltypes file is achieved by setting Qt.qml.typesInstallDir (see
https://doc.qt.io/qbs/qml-qbsmodules-qt-qml.html#typesInstallDir-prop).
Christian
More information about the Qbs
mailing list