Qt Declarative API Changes

Published Friday August 21st, 2009
7 Comments on Qt Declarative API Changes
Posted in Qt, Qt Quick

As with any Qt API, the Qt Declarative QML API that we expose needs to be carefully thought through to provide a consistent and intuitive developer experience.

One area of inconsistency has been the mixing of nouns and verbs. A declarative language describes what, not how. An example of this is the SetProperties element. This element describes the changes to one or more properties in a particular state. The SetProperties name has a distinctly imperative flavor. It implies an immediate action and fails to capture the nature of the element. Changes to properties in a state are merely overrides that will be restored when the state is left. These factors lead to the proposed renaming of SetProperties to PropertyChanges.

We are currently in the process of reviewing the entire QML element API. We expect the review to be complete by the end of August, though it may take a little longer for the proposed changes to propagate into the code. Unfortunately, if you are a Qt Declarative early adopter you will need to update your code. In order to help with this there is a list of changes and pending changes in the src/declarative/QmlChanges.txt file in the kinetic-declarativeui branch of the Kinetic repo.

BTW, if you’ve been experimenting with Qt Declarative we’d love to hear what you’ve been doing and how you’ve found using QML.

Do you like this? Share it
Share on LinkedInGoogle+Share on FacebookTweet about this on Twitter

Posted in Qt, Qt Quick


yan says:

So, a first release of Declarative ui is in preparation?
if, it will not previous for 4.6, it will be out under QtSolution?

pinaraf says:


So far, my experiments with QML is trying to write an application that will run full-screen on passive screens to display information to students in a school.
QML allows a faster and easier development : writing animations is really boring with “classical” code. I’ll also be able to give most of the work to students that are good with design…
BTW, some elements like Video are really missing. I’m gonna try to work on it in my kinetic clone, but I’ll need some time.

Scorp1us says:

I would love to use DeclarativeUI, but I could never find enough documentation to get going. Also, I’d like it to be posted as a solution. Finally, if I did use it, it would have to be integrated with phonon so it can do video. But my biggest problem will be that there is no QGraphicsItem wrapper that exposes properties for animation. Like pos, opacity, etc.

jeez says:


QML is great! It makes UI and animation development way easier. Can’t wait to see a “official” release of it!
BTW, I have a [not-so-important] question: does QML stands for something like “Qt Markup Language” ? If so, and now that it isn’t a markup language anymore this name will continue to apply ?

Henrik Hartz says:

@yan; Qt Declarative UI will not be in Qt 4.6. It’s tentatively planned for Qt 4.7. On the other hand, we have integrated some of the key enablers in Qt so we hope to be able to make the Qt Declarative UI codebase runnable on top of one of the intermediate maintenance releases of Qt 4.6, but we are of course focusing on finalizing the API and architecture first.

Henrik Hartz says:

@jeez We are (currently) using “Qt Modeling Language”. The TLA has some historical residue; it started as an XML language and was designed to instantiate a tree of QMetaObject’s. So to add to the confusion, the original source of this name is actually “Qt Meta Language”

warwick says:

@Scorp1us: as with other branches on Gitorious, you’ll need to generate the documentation by running “make docs” from the top level directory. You can then start from doc/src/index.html, click on the “Declarative UI” link in the middle of that page; from there, work your way through the links under “Getting Started” – the examples, and tutorials. Once you’ve got the learning out of the way, use the link “QML elements” as the main index to QML elements in the same way you would the class list for C++.

Commenting closed.

Get started today with Qt Download now