Here at Qt Developer Days in Munich we’ve heard how Nokia wants to see “Qt everywhere”, and will be supporting Qt on its Maemo operating system and on Symbian, as well as adding specific support for Windows 7 and Mac OS X 10.6, “Snow Leopard”. Qt already works on Microsoft Windows Mobile, and of course on Linux which is where it all started. What about Google Android, Palm WebOS, Apple iPhone? Nothing has been promised, but there is hope that Qt will eventually work on at least some of these other systems.
So is “Qt everywhere” a realistic proposition? Here’s a few impressions from the conference. First, a bit of context. Qt is a C++ framework for cross-platform development. and although bindings for other languages exist, Nokia says it is focused on excellence in C++ rather than working with multiple languages. Developers get the advantages of both native code executables and cross-platform support, and Qt is popular on embedded systems as well as desktops and mobile devices.
Qt is an open source framework which was developed by a company called Trolltech which Nokia acquired in 2008. Its motivation, one assumes, was to simplify development for its own multiple operating systems, especially Maemo and Symbian. Still, it has also taken its responsibilities to the open source community seriously. Qt was originally available either under the GPL, which requires developers to make their own applications available under the GPL as well, or under a commercial license. This limited Qt’s take-up. In March Nokia introduced a third option, the LGPL, which is a more liberal and allows commercial development using the free license. The result, we were told, has been a 250% increase in usage (though how this is defined is uncertain) accompanied by “a small drop in revenue.”
Although the revenue decrease is troubling, it is not a disaster for Nokia whose main business is selling hardware; and if take up continues to increase I’d expect revenue to follow.
Since the Nokia acquisition, Qt has been energetically developed. 2009 has seen the release of a dedicated IDE called Qt Creator. I was interested to see a company that has chosen not to go the Eclipse route for its primary IDE, though there are plug-ins for both Eclipse and Visual Studio. The trolls explained that Eclipse came with too much baggage and they wanted something more perfectly suited to its purpose, a lean approach that is in keeping with the Qt philosophy.
Another important move is the inclusion of Webkit within the framework, the same open source HTML engine that powers Apple’s Safari, Adobe AIR, and the browser in numerous Smartphones. Webkit also comes with a Javascript engine, which Nokia is exploiting in several interesting ways.
The big deal at Qt Developer Days was another new project called Kinetic. This is comprised of four parts:
1. An animation API.
2. A state machine.
3. A graphical effects API.
4. A declarative API, currently called QML (Qt Markup Language), though this may change.
Many of these pieces, though not the last, are already present in Qt 4.6, just released in technical preview. Nokia has not announced a specific date for Kinetic, though there were mutters about “first half of 2010”.
The thinking behind Kinetic is to make it easier to support the graphical effects and transitions that users have come to expect, as well as improving the designer-developer workflow – showing that it is not only Adobe and Microsoft who are thinking about this.
QML is significant for several reasons. It is a JavaScript-like API: we were told that Nokia started out with XML but found it cumbersome, and settled on JavaScript instead. It is designed to work well with visual design tools, and Nokia has one code-named Bauhaus which will be part of Qt Creator. Finally, it allows snippets of JavaScript so that developers can create dynamic user interfaces.
At runtime, QML is rendered by a viewer widget, which can be programmatically controlled in C++ just like other Qt widgets.
Nokia’s hope is that designers can be persuaded to work directly in the QML designer, enabling free exchange of code between designers and developers. It is a nice idea, though I doubt designers will easily transition from the more comfortable world of Photoshop and Flash. However, even if in the end QML is used more by developers than designers, it does greatly simplify the task of creating a dynamic Qt UI. Note that there is already a visual GUI designer in Qt Creator but this is geared towards static layouts.
Long term, who knows, we may see entire applications written in QML, opening up Qt to a new and broader audience.
You can see the latest Qt roadmap here.
Qt pros and cons
I was impressed that attendance here has increased – from around 500 last year to around 700 – despite the economy. Those developers I spoke to seemed to like Qt, praising the way it self-manages memory, though some find the model-view aspect too complex and apparently this is to be improved. Nokia’s stewardship and openness is appreciated and the Qt roadmap generally liked, though there is concern that its understandable focus on mobile may leave the desktop under-served.
Cross-platform capability is increasingly important, and for those who want the performance and capability of C++ along with really good Linux support – important for embedded use – Qt is a strong contender. The focus on mobile is right, not only because of Nokia’s own needs, but because demand for Smartphone apps can only increase.
Integrating with Webkit is a smart move, opening up possibilities for hybrid web/desktop applications and giving Windows developers an alternative to embedded IE with all its quirks.
The open source aspect is another strength. This is now a good selling point if you developing for certain governments (the UK is one such) or other organisations that have a bias towards open source.
That said, talk of Qt everywhere is premature. The mobile space is fractured, and without iPhone, WebOS or Android Nokia cannot claim to have a universal solution. Nor has anyone else; but I’m just back from Adobe MAX where we heard about wider support for the Flash runtime. Then again, few choose between C++ or Flash; Adobe’s runtime is pretty much off the map for attendees here.
Qt is well-established in its niche, and is in good hands. I will be interested to see whether Nokia is successful in broadening its appeal.
Incidentally, if you can get to San Francisco you can still catch Qt Developer Days as it is running there from November 2nd-4th.