[Qbs] Qbs Rule for a tool like syncqt.pl

Christian Kandeler Christian.Kandeler at qt.io
Tue Jan 22 09:34:41 CET 2019

On Tue, 22 Jan 2019 09:23:01 +0100
Christian Gudrian <christian.gudrian at aucos.de> wrote:

> Am 21.01.2019 um 11:55 schrieb Christian Kandeler:
> > but technically, they aren't the "real" headers, since they are not 
> > what you include. 
> That's true. They are however the header files I edit in QtCreator. And 
> it's code model seems to only consider "hpp" tagged files. 

Yes, that's true. So maybe the approach with the extra product is the pragmatic one:
    - Tag the headers normally as hpp within your product (i.e. don't do anything special).
    - Have an extra product with only the headers. That one does not need a cpp dependency. It tags the files suitably and contains/pulls in the Rule that creates the "real" headers, tagged as hpp. The product should have "hpp" in its type.
      If you have more than one product, then of course you'd use a custom base item with wildcards.
    - The app/lib product gets a dependency on the headers product. 
This approach should ensure a correct build and proper highlighting for your headers in Qt Creator. The only drawback is that you will find your headers listed twice in the IDE.


More information about the Qbs mailing list