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

Ivan De Marino ivan.de.marino at gmail.com
Wed Mar 31 14:48:58 CEST 2010


On 31 March 2010 13:06, Alan Alpert <alan.alpert at nokia.com> wrote:

>
>  Onsdag 31. mars 2010 19:03:26 skrev ext Ivan De Marino :
> > 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?
>
> You're doing about what we'd suggest, with the exception of that base URL.
> You
> should be able to simply load qrc:/qmls/start.qml and then any paths inside
> the QML (like relative image paths) should use the qrc path automatically.
>
I'll try to remove it and be sure that everything is relative.
And I'll let you know ;)


>
> > 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?
>
> We've thought about it, but would like to hear about how it goes from
> someone
> actually doing it :) .
>
I'm not only writing here.
I'm being posting on Twitter like hell.
I'm practically stalking @hhartz about the Maemo 5 builds.
What else should I do more? :P

Anyway, jokes aside QML is so promising that I decided to develop my current
project on it. I hope I can rely on the fact that, but early H2 I'm going to
have something stable.
It will work as a strong advantage the knowledge of QML: UI wise I think
it's the way forward to bring Qt to the Cocoa/Cocoa-touch level... and
actually way beyond! ;)


>
> --
> Alan Alpert
> Software Engineer
> Nokia, Qt Development Frameworks
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml
>



-- 
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/bed5f778/attachment.html 


More information about the Qt-qml mailing list