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."
Really? How? Without looking to see if they come distro'd with Qt*.dll that is.
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
My understanding is that the Qt libraries are on the order of hundreds of megabytes. Bit large for a library on a machine with 16G storage,
Native App
Qt App
There are huge differences. Qt doesn't do tool bars correctly. The text isn't aligned correctly in the ring menu. It uses a non-native widget to resize the tool bar. The icons look all out of place, doesn't used the native platform standard icon for the printing.
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
Intertesting, in some apps the only way I was able to tell it was a Qt app was by noting the "About Qt" help menu item. You must be looking at ancient versions of the Qt libs. Or something. Qt is really slick these days.
Python: 'And then suddenly you have a language which says "we're all stuck with whatever the whiniest coder wants".'
Qt doesn't do tool bars correctly.
Yes, it does. Love your narrow test case of OSX, which I have used briefly and not in this context, and don't anticipate using again unless prodded. Try looking at Qt on Windows, Gnome, or KDE, guy.
Python: 'And then suddenly you have a language which says "we're all stuck with whatever the whiniest coder wants".'
^ the only informative and correct comment in this thread.
factor 966971: 966971
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.
I guess Apple just needs to catch up so we can have standardized UIs.
Qt doesn't do tool bars correctly.
Yes, it does. Love your narrow test case of OSX, which I have used briefly and not in this context, and don't anticipate using again unless prodded. Try looking at Qt on Windows, Gnome, or KDE, guy.
I tried, but the blood in my eyes made it hard to evaluate after a few seconds.
Jesus was all right but his disciples were thick and ordinary. -John Lennon
Exactly.
Python: 'And then suddenly you have a language which says "we're all stuck with whatever the whiniest coder wants".'
A particular developer's inability to use Qt properly to create native-looking apps on each platform, that's hardly Qt's fault. You can get the native printing icon if that's what you want, but this developer clearly didn't bother to do it properly. Creating cross-platform apps isn't magic. That's what Java wanted to do, but it's just plain impossible. You are going to have to occasionally be aware of the quirks on each platform you're targeting. An occasional #ifdef OSX or whatever is going to be necessary if you want your app to look great. Qt doesn't purport to allow you to write your code on one platform and magically having it look fantastic on all the other platforms. It *does* purport to allow you do that by spending a little time to tweak things. Nothing you mentioned isn't fixable using Qt. But it can't do everything for you because the platforms are different, by definition.
Mad Software: Rantings on Developing So
QT has some very cool stuff, some nice libraries/utilities that allow you to program the algorithmic part of some app in it and use it everywhere. That part is great.
Problem is, QT is not aimed for app developers, because no way someone that wants to release an app for profit would indulge in this almost pornographic way of cross platforming. QT just has all these images of controllers from the platforms it runs on, and them puts them on top of it's implementation to have a similar look of the platform it's running on at the moment. And well, the look is not that similar and the functionality of the platform, on most of the cases just isn't there.
The end result will always seem an hack, no matter how much work you put into it. And for all that work you take to make your app look almost rightand behaving acceptably, you would probably spend less time and get it looking/behaving perfectly if you just used the native coding tools of the platforms you want to run your app in.
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.
Actually, that's a user preferences setting (I keep it turned on all of the time, since I want to use the keyboard as much as possible). Unfortunately, this setting is ignored by Qt.
There's a history behind this going back to the 1980s, when UNIX vendors decided to adopt the IBM/Microsoft "common user access" spec.
Since then, *nix interfaces have always been very similar to MS Windows, although they've adopted some Mac conventions in the last couple years.
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.
What about haiku? You know, for Qupzilla
People once told me 68K ram was all we needed,
Qt doesn't do tool bars correctly.
Yes, it does. Love your narrow test case of OSX, which I have used briefly and not in this context, and don't anticipate using again unless prodded. Try looking at Qt on Windows, Gnome, or KDE, guy.
The guy is right, you are wrong. Native is Cocoa, end of story. In order for iWorks to be native in GNOME it would have its interfaces rewritten in GTK+ with C/C++ and not C/ObjC, and not leveraging AppKit and Foundation Kit. None of these GTK+ and Qt for OS X are remotely first class, native solutions. At best they are newer versions of Carbon. They expose as little as humanly possible to the dynamic runtimes required in OS X and call themselves native.
So what is your definition of 'native' applications then?
The OS X support for Qt is quite rubbish. Including that I know no one that can successfully compile Qt in a current version of XCode, nor have ever seen any working instructions for doing it.
There is no language called C/C++. Either way, whatever you are rewriting, language itself does not matter as long as it can produce native binaries.
Have you (or someone else) filed a bug about this?
That's what Java *does*. FTFY.
This is a screenshot from experimental desktop UI components for QtQuick, not Qt widgets.
You don't compile Qt in Xcode. You use the build scripts, just like you do on Windows and Linux.
You can build Qt *applications* in Xcode. I do it all the time.
because OSX is not like the others because Apple makes life difficult for anybody who tries to create platform independent software.
That's what Java *does* poorly. FTFY.
FTFY. Java apps look notoriously crappy and barely make an attempt at looking native to the platform. Qt may not be perfect, but it looks like the best attempt so far from where I sit. I have been using PySide which is a Qt Python wrapper. It could not be a whole lot easier, and looks pretty good on Windows, Ubuntu, and OSX. Cannot really ask for a lot more than that. No framework is going to make sure you are using the appropriate icons or whatever for each platform. No Java GUI framework nor Qt.
Native App
Qt App
There are huge differences. Qt doesn't do tool bars correctly. The text isn't aligned correctly in the ring menu. It uses a non-native widget to resize the tool bar. The icons look all out of place, doesn't used the native platform standard icon for the printing.
Actually most of the faults you mentioned in that example are are more to do with the program itself and not Qt. Qt does in fact do toolbars correctly on OS X (see the Qt documentation for specifics) but for some reason the TeXworks developers chose not to do it that way. Also, since icons are just loaded from image files there is no reason the OS X standard icons can't be used (I do agree that Tango icons look rather out of place there and I think some of them like the hand are even thr wrong resolution).
It's all a matter of effort. See http://jshot.info/ for an example. And AVG is written in QT and is awful in Windows.
Being a hardware vendor can do that to you.
Python: 'And then suddenly you have a language which says "we're all stuck with whatever the whiniest coder wants".'
>> Qt doesn't do tool bars correctly.
Wrong. Qt is perfectly capable of doing the integrated toolbar on Mac. Just because Texworks chose not to do it that way (because they wanted additional flexibility in the toolbars which a unified toolbar doesn't offer) doesn't mean Qt can't do it.
>> The icons look all out of place
Icons are 100% the responsibility of the software creator, not Qt. Clearly you don't understand how software works.
That doesn't seem to bother all of the people using MS Office and Adobe products, among other things.