[Qt-qml] QML into your Native App: how do you do it?

Ivan De Marino ivan.de.marino at gmail.com
Wed Mar 31 11:03:26 CEST 2010


Hello.
The question is in the Subject: How do you package your QML into your Native
App?
Of course, assuming you do have developed a Native App that uses QML for the
UI.

Myself I'm doing like this.
1) I have putted my QMLs into a simple hierarchy of directories, just 2
levels. This allowed to developed the UI quite "componentized".
2) I include every QML and image used from the QMLs into a QRC file.
Extension for all this stuff will be "/qmls/"
3) QML code refers to images through their "qrc://..." path (I'm not really
convinced I'm doing it right here :-S)
4) I have a QGraphicsView-subclass, a QDeclarativeEngine etc.
5) In the QDeclarativeEngine I call "setBaseUrl" and set "qrc:/qmls/" as
Base URL
6) I load an initial "start.qml", knowing that its "qrc path" is
"qrc:/qmls/start.qml"

What do you think guys?
Am I doing something wrong?
Should I do it differently?

It works fine on Linux, Windows and Mac, using the Qt-4.7-tp1 source release
of few weeks ago.
Not 1 problem across all those platforms: in fact, I do have good
performance and the code is very clean.

I'm struggling to have a version of this running on Maemo 5, but given that
there are mismatches even in the QML grammar required on Maemo 5 latest
build respect to the one on Desktop, I guess the "fremantle-4.7" team is
playing a bit "ahead", catching up quite frequently with the evolution of
the 4.7 branch.
There, on Maemo 5, I have a lot of "undefined/not found" components.

Is anyone doing the same kind of experimentation/work with QML?

Regards
Ivan

PS @Admin @Moderator I made the mistake of sending previously the email, but
through another gmail account. Please ignore it from "detronizator at gmail.com".
Sorry for the inconvenience.

-- 
Ivan De Marino | Software Engineer | France Telecom R&D UK - Orange Labs
w. +44 20 8849 5806 | m. +44 7515 955 861 | m. +44 7974 156 216
ivan[dot]demarino[at]orange-ftgroup.com |
ivan[dot]de[dot]marino[at]gmail[dot]com
www.detronizator.org | www.linkedin.com/in/ivandemarino
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20100331/f9ecdd3b/attachment.html 


More information about the Qt-qml mailing list