[QBS] Use a Group declared in a template file
Axel A
e_ax13 at hotmail.fr
Sun Sep 6 21:00:40 CEST 2015
Hi,
I currently work on a qbs template to create QML extension plugins.
I created a 'qmlFiles' list property and a Group Item, so the user just need to inherit from my template qbs file and set the property :
// QmlPlugin.qbs
[...]
Group {
name: "QML"
files: qmlFiles
fileTags: "qml"
qbs.install: true
qbs.installDir: CustomFuncs.uriToPath(uri)
}
But it seems I misunderstood something. Let's inherit from QmlPlugin.qbs :
// MyPlugin.qbs
QmlPlugin {
// set the qmlFiles property
}
In QtCreator, the Projects tree is like :
MyPlugin
-- QML // <-- The magic Group
---- QmlPlugin.qbs:XX // <-- /!\ problem
---- SomeFile.qml
---- AnotherFile.qml
As you see here, the referenced qbs file is the template. So, when I use the Projects tree's context menu to add QML files, the default path is the path where QmlPlugin.qbs is located (and not MyPlugin.qbs). It decreases the user experience a little bit.
Note that I set the qbsSearchPath in my project qbs file to allow Qbs to find QmlPlugin.qbs.
Am I using Qbs properly ? Is there a way to create reusable Qbs components like this ?
Thank you very much,
Axel A
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20150906/8f9e3957/attachment.html>
More information about the Qbs
mailing list