Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Qt 5 and Android (rburchell.com)
46 points by mariuz on July 18, 2012 | hide | past | favorite | 16 comments


Qt (especially Qt 5) is one of the most portable toolkits out there, its almost like Webkit in that respect. Lot of excellent work has been done in Qt 5 (and Qt 4.8) to make it easy to port to any platform with minimal dependencies. It already works on Windows (albeit Win32, not WinRT), Linux (X11, Wayland as well as almost pure Qt), OSX, QNX.

Sure, it is still not a one-click task, but that can never be the case. I think Qt has a bright future simply because it is essentially unkillable at this point. (Open-source licensing, open governance already in place, highly portable).


That's pretty much the best reason to keep using it. It's got a good head of steam for pushing forward so it'll take a lot to kill it off.


Note this is (currently) using a custom Android build modified for Wayland support, so it doesn't sound like Qt 5 on normal Android phones is particularly close.


I hate JNI so much that I would actually go an extra mile to port everything to Qt. Please make it happen!


I hate JNI too!! free hug


It extremely saddens me that Qt is still not heavily working on mobile. I would gladly pay for official support on Android and iOS. They could have become the cross-platform mobile toolkit. I wonder if Nokia is the reason why that's not happening.


It's working extremely well on Symbian and Maemo/MeeGo, where it's the recommended way of building apps (still on the Qt4 branch).

There has been work towards making porting to other platforms easier with the Lighthouse project, but I guess the official porting and integration work should be Google's and Apple's responsibility.

There are unofficial ports for Android and iOS, and actually a few Qt apps on App Store and Android market already.


> It's working extremely well on Symbian and Maemo/MeeGo, where it's the recommended way of building apps (still on the Qt4 branch).

Of course it is. Nokia might have bought Trolltech just for this reason. But the fact that it isn't supported on any non-Nokia platform cancels all the benefits.

> ...I guess the official porting and integration work should be Google's and Apple's responsibility.

Should Microsoft maintain Qt's port to Windows? That's not how it works. Both Apple and Google care only about their own platforms and existence of strong cross-platform solution will actually hurt them. They _benefit_ from lock-in and inability to port apps from one platform to another.


Well, I wasn't clear but I implied that it hasn't happened because rather closed nature of Android and especially iOS. I'm not sure if this is the proper reason though.


Qt will never work well on Android (or iPhone) as their approach to cross-platform is to expose an API that is a subset of features common to all platforms (this is one of the reasons that Qt makes fairly ugly applications on Mac).

I can see Qt becoming (more) popular on mobile for games (or other full-screen non-widgeted applications) but until they take a MonoDroid approach to wrapping existing APIs it'll always be worse for the user than a native alternative.


could someone please explain in general what is the state of Qt5 on Android? Thanks!


Qt 5 work on Android looks to be highly experimental at this stage. You should look at Necessitas project. Qt 4.8 works fine for the most part, though apps that do 3D work through OpenGL don't always work due to limitations in Android GL stack. Non-OpenGL apps should work fine with several Qt apps that I know of in Google Play already.


you can check the necessitas roadmap for the next release http://community.kde.org/Necessitas/Schedules/alpha4 and todo list http://community.kde.org/Necessitas/TODO


I love Qt on desktops. It's amazing for cross-platform development and it's a shame that much shittier alternatives like GTK+ are far more common.

But it's just not going to work on cross-platform mobile. The user interfaces in, say, Linux and Windows (7) use very similar if not identical UI components and patterns. Android and iOS are very different about the designs of their apps (even though they may seem similar at first look).

If you want to make well-designed apps that actually comply with the guidelines, Qt will need to include millions of different proxies to native behavior to accomplish this. For example, the menus of your app will involve creating it once for Android and once for iPhone. Then you have a lot of different logic for the Android version of your app and iOS version of your app and it becomes a gigantic mess.

Of course, first you need to make sure that at least the basic components that exist in both platforms look and behave correctly. Buttons, check boxes, text boxes... Right now in Qt for Android they don't even use the native styling but fall back to something that looks like Linux from 15 years ago.

Not only that, there are so many things that you have to get right with creating an UI for a mobile touch app from scratch that it's hard to even start listing out the reasons here. One thing that I can think of right now is native touch behavior: even Google can't get this right in Chrome for Android, where scrolling web pages feels completely different to other lists in the OS and the built-in stock browser. (Firefox has the same problem.)

Then there's accessibility, the adaptation of your UI to wildly varying screen sizes and densities and the list goes on.

Even worse, Android UI is constantly evolving at the moment and there are so many new things. Countless developers fail to adapt these new features in their native apps: Qt isn't going to fare any better.

To accomplish an Android UI that looks and feels familiar you need to use the native libraries. It's that simple. They're in Java, it sucks, deal with it.

The developers of the Necessitas Qt port for Android seem to be so out of touch with reality anyway. I remember reading a discussion in their mailing list when they were getting started about the soft keyboard: their intention was to _implement their own soft keyboard in the apps_ instead of using the native keyboard. Fortunately, somebody sane intervened.

There's some existing apps in the Play Store that actually use it and if you take a look at them you can see how much of a trainwreck Qt on Android is. https://market.android.com/publish/images/PQAAAPtpmMphsM1j7-... is a fairly descriptive screenshot.

Also, Necessitas requires the user to install 30 megabytes of libraries. That is absolutely insane and many older Android models are alarmingly lacking in the storage space allocated for apps.


I just want to punch some holes in your reasoning:

0. I agree that if you want to get native look you should use native tools but there is market for apps that don't have to look native (e.g. games). Actually I see bigger demand for custom looking apps.

0.a. Your screenshot is for pure Qt but Qt strength in mobile landscape is in Qt Quick. That includes writing UIs that adapts to different screen sizes and densities. It is actually sad that Qt Quick which is pure gold might be eliminated by HTML5. While I hope that open source nature of Qt will help here. We will see.

1. There are more platforms than Android and iOS. While those two make majority of smartphone market but why we should forget that they gained popularity in recent 5 years and might lose it in the next 5. While I doubt that this will happen but who knows.

2. Even if exclude older Android models we still have huge market left.


What does deployment look like on the device? If you like in the libraries, wouldn't your packaged app be significantly large?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: