[Development] QML Runtime

Kevin Krammer kevin.krammer at kdab.com
Tue Dec 11 10:47:02 CET 2012

On Tuesday, 2012-12-11, Alan Alpert wrote:

> Goal: "qml" application. Something you can use like "qml main.qml" on
> a linux system, or "./main.qml" where main.qml starts with
> "#!/usr/bin/qml". I have no idea how this is supposed to work on
> windows or mac, but I'm sure there's some equivalent :) . Basically
> the idea is to be usable like other scripting language runtimes e.g.
> perl, python, mzscheme (but not providing an interpreter shell... in
> the first version at least).

I like the idea. A lot :)

> One big difference would be less flexibility about the invocation. As
> a debugging tool qmlscene needs to be able to run smaller "units" of
> QML to simplify debugging, that's why it just puts the top-level item
> into a QQuickView. While that works for a lot of cases, it's not
> really application behavior. qml should leave the window entirely up
> to the application, meaning that the root item of any GUI application
> would be a Window{} or similar. Note that this restriction would never
> fly in qmlscene, because qmlscene needs to be able to run the
> components of an application (like the inside of your Button.qml) to
> debug and test them in isolation. This additionally gives the
> advantage of no excess QQuickView when running a non-gui QML app
> (which isn't really an issue for debugging, but sucks for deployment).

The main difficulty I see is how to determine which application class to 

If you load a non-UI QML file you might not want QGuiApplication to be 
If you load a QtQuick1 file you'll need QApplication instantiated.
If you load a BB10 Cascades application you'll need a 
bb::cascades::Application (which is a direct subclass of QCoreApplication) 

Maybe something like enabling QML plugins to optionally create an application 
instance plus some heuristics for pure source applications?

** Qt Developer Conference: http://qtconference.kdab.com/ **

Kevin Krammer | kevin.krammer at kdab.com | Software Engineer
Klarälvdalens Datakonsult AB, a KDAB Group company
Tel. Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
KDAB - Qt Experts - Platform-independent software solutions
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4712 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20121211/a59ad5c3/attachment.bin>

More information about the Development mailing list