[QBS] Qt Quick Compiler with QBS

Joerg Bornemann joerg.bornemann at theqtcompany.com
Fri Feb 13 14:21:11 CET 2015


On 13-Feb-15 13:15, olivier musse wrote:

> Many thanks for adding this feature request.
> Since QtQuickCompiler is a compiler which seems to work by transforming
> qml files into cpp files, perhaps it can be handled without any
> development in QBS but just by using Rules.
> qiquickcompiler.exe is a command line tool so it should be possible but
> since when using a pro file, everything is hidden on how it works, we do
> not have any idea on how to call it.

It's possible to add qtquickcompiler support without modifying qbs. But 
adding a rule is not enough. When you write CONFIG+=quickcompiler the 
following magic happens:

All qrc files in RESOURCES are scanned.
If foo.qrc contains .js or .qml files, then it is removed from RESOURCES 
and passed to the qtquickcompiler instead.
If foo.qrc contains additionally files that are not .js or .qml, then 
those files are added to a newly generated .qrc file.
So all QML .qrc files are passed to the qtquickcompiler, the non-QML 
.qrc files are passed to rcc. Additionally, loader code is generated 
(qtquickcompiler_loader.cpp).

> Since we are commercial users, we may ask information to the QtCompany
> Support team on how call must be made. Do you think it can help?

I cannot make promises on behalf of our support team. But you can always 
ask them. :)


BR,

Joerg



More information about the Qbs mailing list