Qt-contributors-summit-2013-Evolution-of-the-QML-language

From Qt Wiki
Revision as of 09:18, 6 February 2015 by Maintenance script (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Forward Versioning Control

Uses Qt versions, meaning no new features in patch releases.

For features that won’t provide good errors, consider using pragmas to enforce a clear error message at the top of the files

Impending Features

Targeting 5.2

Pragmas

new “pragma foo” lines will be added. pragma lines must come in the preamble before all item declarations, and some might require being placed before import lines. Note that unlike QML/JS files, there is no “.” before the line. Example:

Singletons

New “pragma singleton” makes this QML file represent a type which is a singleton type. Behavior of type is identical to C++/JSValue singletons.

Example:

Long term features

No schedule yet. Note that attached properties are currently planned to be left with C++ as an advanced usecase.

Enums in QML

Something like

Grouped properties in QML

Something like
Where CustomObject is a QObject derived type, and the non-optional initializer provides a default value which is copied on write.

const properties

pragma strict

Mostly like JS pragma strict, may provide even more type safety by denying implicit conversions (if we add explicit conversions of course).