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
                                          
_______________________________________________
QBS mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/qbs

Reply via email to