[Development] Adding QML to qmake variables
sarah.j.smith at nokia.com
sarah.j.smith at nokia.com
Tue Dec 6 01:24:58 CET 2011
Hi
Comments in line below.
On 06/12/2011, at 6:23 AM, ext Tomasz Siekierda wrote:
Hi,
working on some QML project now (my, I haven't suspected that Qt Quick
is THAT gorgeous... wow, thank you, Trolls, for making it!), an idea
struck me, that there is no variable in QMake to add QML files to the
project. While I am aware, that both DEPLOYMENTFOLDERS and OTHER_FILES
can be used to do just that, I feel QML deserves a separate keyword
just as much as source, headers, ui files do.
This would be nice.
Now, this is not just about a keyword being there, there are 2 things
I have in mind here:
a) it would make Qt Creator show QML files in project (and maybe JS files, too?)
b) it would take care to copy those files during build (much like
DEPLOYMENTFOLDERS do, although this variable is not available in
official documentation, as far as I can see)
This is an issue we've struggled with for a while.
You do want to be able to see these guys in the Qt Creator project browser. I wonder if they are also not available via <ctrl>-K file find or project search, as well if they are not somehow included.
Trouble with DEPLOYMENTFOLDERS is that it is really a Symbian creature, and thus not a good choice for this. Especially since it might be scoped out easily.
Alternatively, b) option could be added to OTHER_FILES.
Any thoughts? Good/ moderate/ insane idea? Or maybe it was already
discussed and rejected (a quick search did not give me any positive
results here).
What we in Qt3D are moving over to now is create a QML_FILES variable and add that to OTHER_FILES.
We also put QML_FILES into a QMAKE_EXTRA_COMPILERS rule which has the "compiler" as just a copy command. That is for the case where we're hacking on the code, and for the case where a package is being built it gets added to the INSTALLS instead.
https://qt.gitorious.org/qt/quick3d/blobs/master/src/imports/shapes/shapes.pro#line47
This works reasonably well, but again its a bit of a hack, and fragile with the scopes, and it would be nicer if the plumbing was hidden away a bit more.
btw, don't look too closely at our pro scripts - they are awfully crufty with Symbian/Harmattan and Qt 4 legacy stuff in there which is slowly being refactored. :-)
Sierdzio, I think it would be a great idea to provide explicit support for this, and to do so with a view to how it appears in Qt Creator, as well as how it interacts with qmake - remembering that the two have different qmake file interpreters.
Sadly, I have no experience in QMake development, so I won't be able
to help in implementation much, at least not without some initial
guidance (where to start).
I might be wrong but I think Marius is the owner of the qmake build stuff right now. Obviously for the qtcreator stuff that is a different team - maybe Roberto would know?
Our team don't have any bandwidth to help with implementation but I would love to see this happen and could maybe help with some guidance and testing. :-)
Cheers,
sierdzio
PS. Blimey, I've just checked, and OTHER_FILES is also not documented...
_______________________________________________
Development mailing list
Development at qt-project.org<mailto:Development at qt-project.org>
http://lists.qt-project.org/mailman/listinfo/development
Sarah Smith
Senior Engineer Team Lead Qt3D
Nokia Qt Development Frameworks
Mobile: +61 448 283 476
Sarah.j.smith at nokia.com<mailto:Sarah.j.smith at nokia.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20111206/6d1680a3/attachment.html>
More information about the Development
mailing list