Qt 5.1 Adds Android and iOS Support
colinneagle writes "This week, the team at Digia rolled out the first alpha release of Qt 5.1, which is slated to have the first round of support for Android and iOS, with full support coming in 5.2. The goal is to make 5.1 completely usable for building complete, shippable apps for both mobile platforms. That means Qt can now be used to build native, smooth applications on Linux, Windows, Android, iOS, MacOS X and even BlackBerry 10, all with an excellent integrated development environment – QtCreator. Coming with version 5.1 is also something called 'Qt Quick Controls' — which is a set of nice, reusable user interface controls. Currently, it is focused on Desktop applications, but is expanding to add touchscreen-specific features. And, importantly, this release also brings 'Qt Sensors' into play. 'Qt Sensors' are pretty much exactly what they sound like — access to hardware sensors on devices where they are available, with built-in motion gesture recognition. Definitely a big plus for Android and iOS applications."
WTF are you talking? Qt use the native style APIs of the different platforms to query metrics and draw most controls. On some platforms (such as MeeGo and KDE) Qt is the native API.
Digia and the Qt Project has been exploding with great new work.
Qt 5.1 is adding initial support for Qt Quick Controls formerly "Desktop Components". These are packaged Qt Quick controls such as sliders and tables with skins for each of the different platforms.
The Qt Project has just recently started shipping the Qt Installer Framework which is a cross-platform installer framework (that is used by the Qt installers). After managing multiple installers on different platforms for my own open source work, I'm really looking forward to digging into this.
Another huge project is the new Qt Build System or qbs. This is a replacement for QMake and I'm really excited to see how it shapes up against CMake.
With the recent advancements in the C++ standard and Qt, it is a very exciting time to be a C++ developer.
There has been somewhat hackish support available for a while to use it on Android. Having official support will be nice. Now I just have to write my killer app and live the lifestyle of the idle rich.
Easy Online Role Playing Campaign Management
On Win platform:
QtCore 2.6MB, QtGui 8.5 MB, QtNetwwork 0.9MB, QtOpenGL 0.8 MB, QtWebkit 13.1MB
+ MSVC++ Runtime libs: 7MB
So it is in the few 10's MBs range
Native controls means more than to have the same look, if that is the way to measure "nativeness", then Java Swing UIs (Windows/GTK L&F) are native because they call platform theme APIs.
When a toolkit draw controls by itself, the applications normally lose a lot of UI functionality, for example, if Android/iPhone controls add proper default assistive technology metadata to their controls, the toolkit (QT in this example) need to do the same for each control they draw, because the OS don't see buttons as buttons, It see them as a custom control. If the platform control change behaviour in a new OS release, the QT control will not see it, for example when Windows added default context menus to the text fields, self drawed controls don't expose that behaviour until applications are updated with a new version
Unfortunately - on platforms where Qt isn't the native UI already - Qt just emulates (draws) the native UI, it doesn't actually use the native UI controls.
On Windows, Qt does a very good job of emulating the native UI. But then again I'd argue that Windows has few truly native UIs. You always notice small differences in how controls behave between different apps. I guess all the different versions of MFC, WPF, VCL, WinForms and whatever implement controls slightly differently from what the Win32 API offers and even between different versions of itself. But users are used to these inconsistencies, so no big deal.
On OS X, the situation is unfortunately a lot worse, probably because Cocoa is so different from everything else that it's hard to emulate properly using primitives from other toolkits. For example you can notice that Qt draws the focus border around buttons differently than Cocoa does. The biggest difference being that Qt buttons are focusable but Cocoa buttons are not. Toolbars also look different: in Cocoa they blend in with the window title bar. Qt doesn't do this - the toolbars look very much Windows-like. The border spacings and alignment are also off. Developers often don't take time to align and space all the controls properly to give them a Cocoa look.
The problem with a lot of native controls is that they are hopelessly limited in what they can do. For example, on Windows the classic controls can't really be used outside of a classic application - not without a huge amount of kludgery. When you get to modern UIs on Windows, you get WPF and that doesn't reuse any native control code AFAIK. It just re-implements everything and the kitchen sink -- just like Qt does (correct me if I'm wrong, please).
With Qt, you can rather trivially render the controls offscreen, generate mock events for them, etc, all in a cross-platform way. With native controls, you're pretty much stuck with whatever functionality is there and there's no way to use them any other way. If the platform doesn't provide a blended rendering model for the UI, you can't get that functionality using native controls. If the platform doesn't provide for an easy way to decouple the controls from a physical screen under control of the OS apis, you can't use them on custom LCD screen attached via USB (a screen otherwise invisible to the OS as a screen).
Yes, it would be possible for Qt to do more to cleanly run native controls behind the scenes so that "arbitrary" changes in behavior would propagate. This would most likely be way too much work for the limited benefit it provides. It may well be that whatever services the OS provides behind native controls can be rather simply reproduced in Qt proper. Yes, it requires tracking the platform you claim to support :)
A successful API design takes a mixture of software design and pedagogy.