Qt allows you to code once and deploy your application to many types of mobile devices. Obviously you still need to
#ifdef in some places in your code. In the mobile world the general targets for Qt are Symbian/S60, Maemo, MeeGo and Windows Mobile devices. There are also APIs know as Qt Mobility which enable developers to add mobile functionality to their applications, like phone contact lis, camera, sensors, multimedia etc.
In this blog post I show how to setup developers environment for Symbian, exacly for S60 5th SDK. To do this we need four things:
- Symbian SDK
- OpenC++ plugin
- Qt for Symbian, I prefer the last one Qt 4.7.1.
- Qt Mobility 1.1.0 (which is the only one compatible with this Qt version)
Install the Symbian SDK first ( the version of ActivePerl required for this SDK is available here) and OpenC++ plugin after that. Then install Qt libraries, during this installation you should select SDKs for which Qt will be used, so select the S60 5th one.
Get Qt mobility and extract it to
C:QtMobilityC:QtMobility%DISTNAME%). The biggest problem is the Qt Mobility installation, as you can read in this project documentation you only need to do that:
Unfortunately, it usually ends up wrong and prevents development, so I recommend to do it manualy:
qt-mobility-1.1.0-epoc32-.zip packages (it is in
C:QtMobility%DISTNAME%) into the root directory of the S60 SDK. From the Qt Mobility archive copy
/features/mobility.prf.template to path
/mkspecs/features/mobility.prf in your Symbian SDK folder. Remember to repeat this step for all the Symbian SDKs which you selected during Qt installation.
Affter all of these steps you are going to have ready development enviroment for Symbian devices. To make a release build and SIS package for a device run in your project directory:
If you want to use the emulator, you must configure the environment: the best way is to install Nokia qt sdk and upgrade them following the description on The Forum Nokia. To make a debug build for the emulator run in your project directory:
Using the emulator with QTestLib framework can be a very simple way for automated testing of the application in the continuous integration process.