[Development] QML Runtime

Knoll Lars Lars.Knoll at digia.com
Tue Dec 11 11:48:43 CET 2012

On Dec 11, 2012, at 10:47 AM, Kevin Krammer <kevin.krammer at kdab.com>

> 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 
> instantiate.
> If you load a non-UI QML file you might not want QGuiApplication to be 
> instantiated.
> If you load a QtQuick1 file you'll need QApplication instantiated.

I'd assume that the runtime will be limited to Qt Quick 2.

> If you load a BB10 Cascades application you'll need a 
> bb::cascades::Application (which is a direct subclass of QCoreApplication) 
> instantiated.

Yikes. Do you really need a different Application type for Cascades? That's pretty bad IMO.


> Maybe something like enabling QML plugins to optionally create an application 
> instance plus some heuristics for pure source applications?
> Cheers,
> Kevin
> -- 
> ** 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
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development

More information about the Development mailing list