Bringing Qt applications to Android – a quickstart video

Published Monday February 28th, 2011 | by

I am pretty sure you read about it… but in case you did not: An Alpha version of Necessitas (Qt for Android) has been released a week ago. With this release, it is now very easy to create, build, debug and deploy Qt applications for Android. All of that is the result of the incredible work by BogDan Vatra, the creator of Necessitas.

BogDan did not only create a Qt port, but also a complete Qt Creator integration for Android, as well as an all-in-one Necessitas installer. And as cherry on top, BogDan implemented Ministro, a deployment service which makes sure that the right Qt libraries are present on the end users’ device and your application does just run.
He did all of that in his spare time, driven by his passion for Qt, Android and FOSS. He does neither work for Nokia nor for Google. This is a pure community effort.

How easy is it to get started? Too easy for words. Just have a look at the video, below.

If you want to try it out, first note that Necessitas currently supports only Linux. Also, you currently need to install Necessitas into /opt/necessitas. More information can be found in the Necessitas Wiki. If you encounter technical issues with Necessitas or just want to send the well deserved kudos to the team, just visit the android-qt Google Groups.

There is not much I can add but again thanking BogDan and contributers for this amazing community port!

Since this project is in alpha stage, and Qt 4.8 is not yet stable in any way, it is not encouraged to already publish your Qt apps to the Android market (you already could though, thanks to Ministro). If you want to get involved into this project, why not having a look at the Necessitas TODO list?

Did you like this? Share it:

Posted in Contributors, Lighthouse, News, Qt

67 comments to Bringing Qt applications to Android – a quickstart video

gemfield says:

what a fantastic work! And the embarrassing things comes to WP7. :)

momesana says:

Amazing.

Nikos says:

Way to go. Hopefully more people will join the project. Making this rock-solid and ready for the masses could mean a big boost in Qt usage.

Benjamin Arnaud says:

Brilliant,

Now we need to push the iPhone port.

Android + iPhone is a win win combo in the smartphone area.

Brett says:

Awesome indeed. And I’m with Benjamin on pushing the iPhone port too.

Android + iPhone puts Qt back into the forefront in my eyes.

Brett says:

Wait a minute. So if one guy did this in his spare time in less than a year, what are Qt’s 260 people doing? Why is there even a discussion on which platforms are priority? Qt Everywhere?

Thomas says:

@Brett: That BogDan Vatra ported Qt to Android in less than a year is not only a testament to him but also to Qt and the people behind it. Without lighthouse and sound engineering all the way around (or a lot of the way at least) it would not have been possible.

Dennis says:

@Brett you are confusing technical reasons with political reasons. Somehow the latter always have a knack for stifling the former.

Srikanth says:

Hi,

Great community achievement, I hope this project will get the best with OpenGov.
Since Necessitas is based on Qt Lighthouse project which is already in Qt 4.8 master, is there a possibility (at least likeliness) that this andriod port (at least in alpha/beta) can be part of Qt 4.8. I came across in qt-interest where Thaigo discussing that it is likely to be part of 4.8. Any confirmation, tip or any info is welcome.

@Brett : I think I can answer that. When buying Qt the goal for Nokia was to push Symbian and their phones. From this perspective porting to Android and iOS is not a good idea. Who would put resources on helping programmers deploying on the competitor’s platform ? That was true two weeks ago.

But now that Nokia has clearly gone for Windows Mobile the priorities might have changed.

Indeed I would not be surprised to see the Android and the iPhone platform properly supported in the near future. Either by the community or the trolls themselves. Who would get enough of Qt on Symbian anyway ?

If all that happens it’s likely that the switch to WM7 will not be such a bad thing after all. Because the “Qt Everywhere” is stronger.

Yakov says:

What about ministro localization? Is it possible to specify custom before download messages?

Stuart says:

This is fantastic work and is particularly timely as the new tablets would really support ports of desktop Qt applications.

This shows the folly of Nokia’s new strategy as Qt developers now have a valid route into Android but not with Nokia smartphones. All the jilted Qt devs who wanted to develop mobile apps will be looking at this now not .net. Especially as Android is a much larger market than the minuscule WP7 market.

If Nokia had any sense they would support this port and therefore give Qt developers a much larger market. This would lead to more Qt mobile apps which would benefit Symbian/Meego. It is quite clear from the recent strategy that Nokia have no sense though. Can only hope that Nokia sells Qt to someone more competent before the inevitable takeover by Microsoft.

aportale says:

@Yakov: Ministro is a pure Android application (apart from some little jni). So, I assume it can be localized like any Android application.
Here’s the source: http://sourceforge.net/p/necessitas/ministro/git/ :)

Brett says:

@Thomas, Dennis, Benjamin

Fair enough. But that’s the knee jerk reaction isn’t it? Another way of thinking is that if Qt supported iOS and Android from day one, a lot more developers would be using Qt. And I’ll bet those developers would then have looked at Symbian and many may have ported their apps to Symbian too. Then this whole thing might have turned out differently. Sure hindsight is 20/20, but there are plenty of people who subscribe to blue ocean strategies that would say this should have been the strategy to begin with.

Anyway, I’m not at all trying to start a debate on this. This is a huge achievement and awesome news. I’m an optimist, so I would like to believe that this is the start of a snowball back into a developer driven mindset, and away from a politically motivated one.

Cheers!

Mike says:

Thanks BogDan, this is a amazing work !!

Alesete says:

This could be good also for Nokia in the future. If Windows Phone doesn’t works, or they just loose the train of application market, they just can bring Qt on Windows Phone and they would bring also all the Qt’s applications back to Nokia’s platforms (already on Symbian and Meego).

Long live to Qt and long live to Android.

PS.: Come on guys, another one for iOS! (For a pragmatic purpose, but ideal for Qt future).

Sergey Galin says:

We have our own port of Qt on Android, called “grym-android-lighthouse”. It is much more complete and already usable for production (not using shared Qt run-time). We have BogDan’s branch merged so it’s probably possible to use his QtCreator integration with our stuff but nobody tested yet. BTW, any help combining Necessitas and BogDan’s branch would be appreciated.

Alessandro for president! Love it :)

Emolaus says:

So incredibly impressive. Great work.

Benjamin Kay says:

The video shows Necessitas using a custom version of qmake. Is it possible to do this with cmake too?

aportale says:

@Sergey Galin: I came across the grym-android-lighthouse repo, and saw also your posts on android-qt google groups. Honestly, I did not realize that grym-android-lighthouse is a completely separate approach to have Qt running on Android. I agree that combining the best of both branches/projects sounds great (at least from my arm chair perspective).

@espen: Thanks :)

Giorgio says:

Great job !! but does qt app looks and feels as native android app ?

I interviewed BogDan for BehindKDE last week. The interview is now on line. A lot of insightful information there!

Dmitry says:

I wonder why don’t we see the apps like Snake or Bubbles of such a quality as shown in this movie on our Nokias, if you even take them as an example for ANDROID???

Scorp1us says:

Maybe the WP7 was the best thing for Qt. Not Nokia or Nokia phone users, just Qt.

SandroG says:

@Benjamin Arnaud:
Nokia has gone for Windows Phone, not Windows Mobile. They’re 2 different products: Windows Phone is not the successor of Windows Mobile, it is a completely NEW product.
The successor of Windows Mobile, from a technical perspective, is “Windows Embedded Handheld”.
There’s a lot of confusion in the web… and this is not helping the developer community. Also Microsoft doesn’t help :-(

aportale says:

@Dmitry: Do you mean that the Snake example doesn’t not look as good on your Nokia device? Or that you are missing an equivalent HD movie showing the Snake example running on a Nokia phone?

AndyCrow says:

I think the Google should be taking a long hard look at aquiring Trolltech – perhaps they could they produce some better quality desktop apps along with mobile apps. Trolltech may start to look more and more appealing if thier court case with Oracle over Java does not go thier way.

Leonardo Vanzella says:

Amazing .. Qt always has great news for developers.

Stephen Chu says:

Funny how people hate politics but just can’t leave politics out in a discussion about technical accomplishment here. :)

Seriously, though. Is there any plan to integrate this to both Qt and Creator? I hate to see different branches for different target platforms. Will it be possible for the Creator part to become a plug-in?

Nikos says:

@Sergey Galin
> We have our own port of Qt on Android

Who is “we”?

> called “grym-android-lighthouse”. It is much more complete and already
> usable for production (not using shared Qt run-time).

Is there a page for this with further information? Projects that are hidden will stay hidden and no one will ever know about them.

Max says:

@Sergey Galin

why don’t you help BonDan? Afraid of not getting much reputation if you are working under BonDan?
Work together and push the hole theme.

BogDan Vatra says:

Thank you all for your kind words, they really mean a lot to me !

Also, I like to send a big thanks to Nokia (trolls) for Qt, Qt-creator, Lighthouse project, without those projects, most probably Necessitas will not exists today. Lighthouse project made my life very easy, I even used trolls framebuffer implementation, also, qt-creator integration was very very easy, so please don’t credit me for this things :) You can credit me for the vision, and because I didn’t made any compromise :)

I like to thanks to Google because they made a fantastic *free* O.S., so you can enjoy Ministro and because Google’s has open mind !

Thank you, Alessandro for the story !

David says:

BogDan

You need to set up a Paypal account for people to contribute to your project. For me and thousands of other Qt developers like me it is worth donating to. Thanks for all your work thus far

Bojan says:

BogDan

You just might have saved Qt for good! To me, you’re a hero! :)

When this project gets into a stable release it will not matter what platforms are alive or dead!

Great work! Keep it up!

Max says:

@aportale

Hello. Do you have the samegame example everywhere to download. Because i’m interested in the building steps. I’ve seen that when you build the system it creates a *.apk.

Regards

aportale says:

@Max: Sources and .apk: http://chaos.troll.no/~aportale/android-qt-demos/android-qt-demos.zip If you try to build the demos, yourself, don’t forget to add the “QtDeclarative” to the “libs.xml”.

Javi Moya says:

I can see the future:

new Nokia’s terminals with WMP are not going to sell very much…
and after that Nokia realizes that Android is the way to go…
and… Qt is here to save us all!!

ohhhh… f*ck yeahhhhhh

THANKS BogDan.

Max says:

@aportale
Nice! Thx!

In the creator i found the option to select the packages (under Project) is that the same as editing the libs.xml?!

It’s a straight road from hear on. All they need to do is support this, make sure it goes main stream and we can cross-compatible apps that work on Android/Meego/Symbian^3 and ARM Ubuntu because they all have Qt implementations. If this follows through, then Symbian devices will have a much longer foreseeable future. I love this progress. Oh, and Nokia has probably lost developers, who will code for WP7?

Sergey Galin says:

@Nikos
> Who is “we”?

DoubleGIS (http://2gis.ru) mobile dev team.

> Is there a page for this with further information? Projects that are hidden will stay hidden and no one will ever know about them.

It is not hidden, just not advertised much. It can be easily found on Gitorious (cloned from android-lighthouse). Also we participate discussion @ android-qt list. As for a Website with Wiki and etc., it’s not done yet but we have some plans. Would be great to do that in collaboration with BogDan or Qt team :-)

@Max
> why don’t you help BonDan? Afraid of not getting much reputation if you are working under BonDan?

We do help everyone who wishes to use our code. BogDan could merge it at any moment, but he refused to accept code which (1) uses additional dynamic libraries (we use QtAndroidCore), (2) has any platform-specific exported functions or which (3) supports placing Qt libs into APK. I, from my side, look at lack of platform integration library separated from QPA plugin and lack of support for all-in-one package as an unacceptable flaw. And some exported functions are unavoidable evil until high-level Qt interfaces are available to do the same tasks.
So because of these differences in ideology the branches were not merged for many months and advancing in different directions and eventually we got our own QPA plugin and QtAndroidCore. Now it would take some effort to combine our stuff with Necessitas, starting with refactoring Necessitas to separate BogDan’s plugin and the shared run-time installer. It is possible to overcome all problems and combine everything together, but it needs some work.

Aamir Maniar says:

Will Qt be available on Window Phone 7 and WebOS as well?

-
http://www.technobits.net – Always remain technically updated….

Sergey Galin says:

@Aamir Maniar

IIRC WebOS allows native plugins, so it looks technically possible (with Lighthouse/QPA).

WP7 – no.

@AAmir Maniar:

Qt is *already* available for webOS and it seems it’s semi-officially supported by Palm itself

http://tamspalm.tamoggemon.com/2011/01/04/palm-uses-qt-4-6-1-in-webos-2-0/

Now the question is, when will that be integrated in Qt mainline?

Kervala says:

Ministro and Animated Tiles demo are already published on Android Market so we can test them :) Well done and thanks a lot for your great work, BogDan !

Biswarup says:

We have heard from “nokia”. Still there is no reaction from google’s side. Strange things going on lately!

vladest says:

Great job Bogdan. With the Lighthouse/Necessitas we really started to have an hope
The questions is: is there plans to integrate QtCreator/Android to main QtCreator branch? Or, at least, build QtCreator/Android for win32?

Dmitry says:

@aportale: I mean that it woukd be great to work on the apps for symbian using QT instead of making QT for android)))

but maybe it’s not the problem of your team…

juzzlin says:

This is just awesome! BogDan, you’re the man! :)

J Mnemonic says:

BogDan. Amazingly good work! Keep it up. I am sure some of us will support you along the way :)

kadajawi says:

With Nokia being able to modify WP7, perhaps WP7 will also see Qt (it would really make sense, because it would make it even easier for Symbian, Meego and Android devs to port their applications to WP7… and WP7 needs applications).

Anyway, cool stuff, I’m curious what I will see on my Android coming from Qt.

Ps: Qt on iOS? Isn’t that a bit a waste of effort? Do you expect Apple will allow it? Like it allows Adobe Air? (Or has that changed?)

Sergey Galin says:

@kadajawi: Technically, Qt for iOS is not a problem and even easier to implement than for Android. Apple removed restrictions on third-party UI toolkits. iOS UI guidelines can be followed with Qt. But as far as I know iOS requires statical linking and App Store policy is not compatible with GPL applications, so in the end only applications with commercially-licensed, statically linked Qt can be released via App Store.

Archon says:

Get this into Qt 4.8, with the Qt Quick, Qt3D, and QML/3D stuff, then you will have a FAR better development platform for Android GUI and 3D graphics than anything else out there!

Exciting stuff. Bog Dan is a god.

Vihigh says:

What a pleasure to run Animated Tiles demo on my Nexus S. Works perfectly! Amazing work ! Qt is not as dead as it appears to be according to all those sad latest news. Thanks a lot !

Hi
I have application that is developed for Win7 and I’ve ported it to Symbian.
I see there is a lot of demand on applications for iPhone,iPad,iPod in the marked.
Today we have special facilities to develop for smartphones as Android Ministro, Necessitas.
http://labs.qt.nokia.com/2011/02/28/necessitas/
Actually I think Nokia devices do the same things but the market is as is and we need strong Qt porting facilities.
It can contribute a lot.
So why not to make something like Ministro, Necessitas for iPhone smartphones?
So I propose to begin to cooperate in opening possibility to full, simple, reliable,approved porting of Qt framework
for Apple smartphones.
Is here any developer that have experience in development Qt application for iPhone etc.?

Sirjoy says:

BogDan, thank you. Your vision will open a lot of doors.

is it possible to develop or to build from already existing tools complete TOOLCHAIN that will build from fully cross platform Qt source full featured application for iOS( Apple smartphones ) on any other platforms as it exists for Nokia Symbian and Maemo?

zhouhl says:

Great work! Qt for Android! I love it!!!

Abdullah says:

It is amazing , you can not imagine how this is useful and important to my Master thesis. Great Work Great Work YOHOOOOOOOOOOOOO :D

It’s an amazing huge improve for QT community and of course for Android community. Thanks a lot!

Igor says:

Excellent work!

Nokia developers and management Shame on you!

aportale says:

@Igor: At the risk of disappointing you, none of Nokia’s developers is ashamed of Qt and Lighthouse, etc. ;)
(Yes, I guess that’s not what you meant)

Amit says:

Gr8…….

Anash says:

Great work!
I understand traditional controls aren’t ideal for a touch-screen device, but are they implemented in QtGui? e.g. can I port my desktop app, and the box layouts, checkboxes, gridview, buttons, menu items will still be there? I know this will be a terrible user experience, but is it possible?

aportale says:

@Anash: The video only showed QML examples, but your QWidget based gui will also work on Android. The widgets do however not look&feel like Android controls since the the QStyle for Android is not (yet) done. The QStyle on Android is currently QCleanlooksStyle.
Although QtWidget based Uis are indeed not ideal for mobile devices, there are quite a few Symbian/Qt applications in the Ovi store with usable QWidget based Ui. A few tweaks here and there, and you have a compromise :)

Anash says:

Wow, I tried it and all of the widgets actually worked very nicely.. it was like looking at a 1-to-1 clone of Qt on windows! However, the bootstrapper would only randomly work (with my somewhat complex application), most of the times crashing before my application began execution (so no debugging information). But very good work! I almost fell off my chair when I saw how perfectly it rendered and functioned!

Commenting closed.