Installing Qt Mobility 1.1 on Ubuntu 10.04 and using it with Qt Creator
Hi
I would like to develop apps to Nokia phones but is not made easy... I'm getting desperate and almost ready to switch to Android.
I didn't find any good documentation on how to use Qt Mobility with Qt Creator. I have done that is is said in the instruction and compiled the source. But I don't know how to get the Qt Creator to use these classes. When I try to compile one of the examples, Qt Creator says that for example Map-apis are not found. How do I "tell" the Qt Creator to use the Mobility Api's?
Re: Installing Qt Mobility 1.1 on Ubuntu 10.04 and using it with Qt Creator
I am not expert on QtMobility, but seems that there are couple of "joins" with
your application's header/.cpp files and application's *.pro file.
Trying to explaine header and *.pro file "joining" in case of QtMobility's
namespace concerning QSystemInfo API as example :
write into header file rows:
#include <QSystemInfo>
QTM_USE_NAMESPACE
write into pro file corresponding decalaration rows as
as header file requires (or vice versa):
CONFIG += mobility
MOBILITY += systeminfo
Seems that, CONFIG += mobility has to be declared always,
when you are going to use QtMobility APIs.
Seems that QTM_USE_NAMESPACE has to be declared always,
when you are going to use QtMobility APIs.
Then #include <Qblaapblaap> and MOBILITY += blaapblaap
has to be pairs.
And sometimes it is better to read maemo documents :
[url]http://maemoide.nokia.com/fremantle/index.jsp?topic=/qt-mobility/html/quickstart.html[/url]
Re: Installing Qt Mobility 1.1 on Ubuntu 10.04 and using it with Qt Creator
I've used example project where all things you mentioned have been done. But still I get cannot compile the project because QtCreator says that Qt Mobility classes are missing... Could someone who has done something with Qt Mobility and Qt Creator (in Ubuntu operating system) write me instructions so that I could check have I done everything correctly?
Thanks
Re: Installing Qt Mobility 1.1 on Ubuntu 10.04 and using it with Qt Creator
Hi,
Are you using the Nokia Qt SDK or just Qt Creator? The Nokia Qt SDK includes Qt, Mobility, device SDKs, and Qt Creator (plus some other things) to make development for devices simple. However, at this point in time it comes with Qt Mobility 1.0.2 not 1.1.0 afaik.
In terms of getting Qt Creator to recognise the Qt Mobility libraries, I'd suggest trying to compile your project from the command line at first (ie, run qmake/make manually, and see what the output is). It's likely that you haven't put something in your .pro file which is needed (specifying the path to the libs with LIBS += -Lwherever, specifying include paths where the mobility development headers reside with INCLUDEPATH += wherever, and so forth). Once you've got it building from the command line, try opening the project in Creator and see if syntax highlighting and autocompletion works then. But the first step is reading up on qmake and the .pro file format, and how to specify dependencies and includes.
If your application builds on the command line, but not in Qt Creator, then your build settings in Qt Creator need to be changed. Have a look at the Project tab in Qt Creator and see if anything (toolchain / paths etc) looks wrong.
Cheers,
Chris.