I am attempting to continue developing applications for Smart Phones (I have a little experience with Android). I have done some deep research & I have decided to start creating applications in Qt C++.
The reason I am doing this is because from my research it seems that I can write an a开发者_开发百科pplication once in Qt then all I have to do is compile it on IPhone, Android, Symbian & Windows Mobile and then I will have an application that will work on ALL these platforms.
My question is: Am I correct that if I write an app in Qt C++ then it will work on the following platforms: Android, IPhone, Symbian & Windows Mobile?
I know that this is kindof a naive question ("What API can I use to work on all platforms") but I have researched alot & they all seem to say Qt can work on all these platforms.
PS, Are there any cons to using Qt to write a cross platform Phone App? Is compiling Qt application code difficult to do on each platform?
This question was asked a long time ago and many things have changed since. For those asking themselves the same question today (beginnings of 2014) then my personal answer is that Qt works 99% on iPhone.
Currently I'm developing an application that uses QSensors, QNetworkAccessManager and OpenGL ES and I have not encountered any problems on OSX, iOS, Windows and Linux. Thinking about porting to Android soon.
The only problem I met was the QtPositioning (GPS) module that is not yet supported for iOS but the workaround is very easy and I wouldn't consider this a problem. It will probably work later this year. Also due to some iOS limitations, the QtWebKit is not available. The rest works like a charm! Great job done.
I have not tested myself on Android but from what I read Qt should also work on that.
You are good to go with Qt C++ (and most recently with QML) for mobile phone development.
My question is: Am I correct that if I write an app in QT C++ then it will work on the following platforms: Android, IPhone, Symbian & Windows Mobile?
Yes it works fine on Android, Symbian, Windows Mobile, Meego, Maemo, Moblin.
I'm a Qt developer and I have used it to develop for Symbian, Meego, Maemo and Android. Since Symbian, Meego, Maemo are officially supported they work 99.99% perfectly on these platforms.
But in Android, it works 95% fine but you require very few workouts.As far as I know, the QtMultimedia Kit is not supported on Android (some pathces are available). But the Android port contributor Bog has said that they will port it too as soon as possible. There is a big community behind Qt as well as Qt for Android. You can also use Mobility APIs as you use in Symbian and Meego. Qt mobile apps are already published in Android market without any problem.
Regarding Windows Mobile, its officially mentioned that even Qt Mobility can be used with that phone and it supports pure Qt C++ code. But I dont think too many users will be using Windows Mobile now, as Windows Phone 7(not supported by Qt)is the latest talk.
Regarding iPhone port, yes there are experimental port by communities. Will be soon available with some examples, I think. I have seen some Youtube videos demonstrating Qt and Qt Mobility working on iPhone.
Recently RIM has said that their BBQ (Blackberry Tablet OS) platform will have an official port for Qt.
Regarding any Linux Mobile(Moblin, Maemo, etc), yes Qt C++ works just perfectly on them.
Regarding Desktop, Qt C++/QML runs almost on all Desktop platforms.
I don't understand that someone like CommonsWare with 145k reps, just came out and said literally like Qt will not work in any of the Mobile platforms. But as he said, if you are going to choose a HTML based API like PhoneGap, then I would recommend Qt 100 times over that. Because Qt can do better than HTML5 in all the ways. It can handle some comlpex problems like 3D, openGL etc much more better and efficiently than HTML5.
After reading all the above answers I'm dissappoint to say that you better not believe these answers and go join this place Qt Labs where you will see and enjoy the real power of Qt.
Recently Qt has gone open governance, where each Qt module will be developed and maintained according to public interest. Further Trolltech, KDE and Nokia are developing it for commercial reasons. So never ever lose Qt because of some bad advide, try it yourself and then decide it by yourself.
Support for iOS and Android is experimental, unfortunatelly. And Nokia supports only newer versions of Symbian. So Qt is cross-platform only on Desktop, and here it really works great ----> Linux, Windows, **BSD, MacOSX, OS/2, Amiga OS4 ....
Its a shame that Nokia started to build windows phones. If they sticked with meemo and symbian at least Qt would be actively developed.
I don't believe Qt will work for the purpose you describe. Unfortunately, I don't think anything else will either. Android basically just supports Java. The NDK will let you write parts of an app in C++, but still requires Java for parts as well.
The new version of Windows Mobile only supports .NET applications (and I'm reasonably certain no other phone supports .NET applications at all...)
This is not entirely true. If a given feature has platform specific, then one must enwrap such constructs inside that platform-name's braces in .pro file.
e.g., for symbian:
symbian {
SOURCES += symbian_file_handler.cpp
LIBS += -llibcryto
}
The bulk of the Qt framework as everyone else has answered will work on all platforms, okay if not all at the moment, it soon will be. Plus Qt is growing in not just it's framework, but also for its support and users.
The only difficulty you will find is when you need to use and external library to run on all platforms. For example, I'm working with ffmpeg and my '.pro' file is currently just set up for Windows and Android, but it works.
Compiling Qt code for each platform is a doddle. Setting up external libraries is fiddly stuff.
精彩评论