×
Namespaces

Variants
Actions
(Difference between revisions)

Using Qt Creator with Symbian

From Nokia Developer Wiki
Jump to: navigation, search
ceefour (Talk | contribs)
(Internal link for Nokia Smart Installer. - Packaging Application as SIS File and Deploying to Symbian Device)
ceefour (Talk | contribs)
(Updated with the newest Qt Creator. - Running the Application in S60 SDK)
Line 82: Line 82:
 
You can interact with the application as you would in a device. You can also change device settings, rotation, simulated device, etc. in Qt Simulator panel.
 
You can interact with the application as you would in a device. You can also change device settings, rotation, simulated device, etc. in Qt Simulator panel.
  
=Running the Application in S60 SDK=
+
= Building Applications for Symbian Devices =
  
* Make any simple project in Qt, if you have an windows SDK installed then do check that the application works fine with windows.
+
The Windows version of Nokia Qt SDK already includes the Symbian compiler that you can use to build applications for Symbian devices.
  
* Select the Projects icon in the Qt creator sidebar.
+
After developing your Qt application (see steps above), switch to '''Projects mode''' (Ctrl+5) and choose '''Symbian Device''' build target. If the project doesn't have the Symbian Device build target, click the "+" button to add a new target and choose "Symbian Device" (note that you must have properly configured Symbian SDK and Qt for Symbian SDK).
  
* In the "Build Settings" section select the Debug option, then press Add  Selected to copy the current debug configuration. Give the configuration some meaningful name. The screen shot below gives a better understanding.
+
[[Image:Qt-creator-symbian-device.png|thumb|none|500px]]
  
 +
The Debug build configuration uses WINSCW compiler, for running applications inside the Symbian S60 Emulator. The Release build configuration uses the GCCE compiler, so you can package applications as SIS files and run/deploy applications to Symbian devices.
  
[[File:QtCreator_Symbian5.jpg]]
+
Now you can run and test your application using Symbian S60 Emulator or a Nokia phone.
 
+
* Select "Show Details" in the General build settings, then change the Tool Chain from '''GCCE''' to '''WINSCW'''.
+
 
+
[[File:QtCreator_Symbian3.jpg]]
+
 
+
* Set the new build configuration active.
+
 
+
* Then the final step is you can build the application and if your build was error free you can open your S60 SDK for which you made the build and check out your application.  
+
  
 
= Building Symbian Applications using Remote Compiler =
 
= Building Symbian Applications using Remote Compiler =

Revision as of 00:04, 1 December 2010

Contents

Overview

Warning.pngThis article does not meet the wiki quality standards: Please make it more useful by adding links or additional information as discussed in the quality standards. When you have done so you can delete the {{NeedsMoreWork}} template from the article to remove this warning.

This article contains out-dated information. With current Nokia Qt Creator the process is highly simplified.

This article will explain, how the developer can use Qt Creator to write and test applications for Symbian SDKs and Devices.

Preparing Your Development Environment

Install the Nokia Qt SDK, which contains Qt SDK, Qt Mobility SDK, Qt Creator, Qt Simulator for Symbian and N900, and libraries, tools (including the emulator for S60 environment), and all documentation you need to get started.

Qt Creator is an IDE built on Qt itself, and contains an easy-to-use visual designer for designing your application UI.

You can also download the individual components:

  1. Set up the S60 development Environment. First install Active Perl and then S60 Platform and Device SDKs for Symbian OS.
  2. Install the relevant Qt for Symbian SDK.
  3. Install Qt Creator binary for Windows.

Note: When installing Qt Creator, make sure to install Qt Creator on same drive where you have installed all S60 SDKs.

Choosing the Default Qt SDK

After following the steps above, I assume that the developer has properly installed the S60 SDKs and Qt for Symbian SDK.

Qt Creator should automatically detect Qt SDKs that have been configured for use with Qt.

Since there may be several Qt SDKs installed in your system, ensure that the correct SDK is used as the Qt build target:

  1. Start Qt Creator from Windows Start button > All Programs > Nokia Qt SDK > Qt Creator.
  2. In Qt Creator Menu bar, click Tools > Options > Qt SDK versions. Now you can set your default Qt SDK version.
  3. Select the you required SDK in Default Qt version field, in our case it will be S60 5th edition Qt 4.6.2.

The Screenshot shown below helps in better understanding:

QtCreator Symbian1.jpg

Creating a Mobile Qt Application

Creating a new mobile application utilizing Qt and Qt Mobility APIs is very easy and straightforward with the latest version of Qt Creator (included as part of Nokia Qt SDK).

1. Click Create Project and choose Mobile Qt project.

Qt-creator-new-mobile-qt-project-1.png

2. Name your project and choose destination directory.

Qt-creator-new-mobile-qt-project-2.png

3. Choose your target platforms. Maemo and Qt Simulator should be pre-selected. You can also choose Symbian/S60 and Remote Compiler if you have configured them.

Qt-creator-new-mobile-qt-project-3.png

4. Edit the main class names or simply accept the defaults.

Qt-creator-new-mobile-qt-project-4.png

5. Finish the wizard to create the project.

Qt-creator-new-mobile-qt-project-5.png

Qt Creator will create your project, already set up to use Qt Mobility APIs, and with build targets properly configured for Symbian, Qt Simulator, Maemo, and Remote Compiler (depending on your previous choices).

You can use the built-in Form Designer in Qt Creator to easily design your application's user interface.

Qt-creator-new-mobile-qt-project-6.png

You can easily switch among the configured build configurations. Developing cross-platform applications has never been this easy!

Qt-creator-new-mobile-qt-project-7.png

Switch to Projects mode (Ctrl+5) to edit build and run settings for your application. You can also add a new build setting for another target platform.

Qt-creator-new-mobile-qt-project-8.png

Finally, you can run and test your application. To run the application in Qt Simulator, make sure Qt Simulator is selected in build/run settings, then click the Run button or press Ctrl+R.

Qt-creator-new-mobile-qt-project-9.png

You can interact with the application as you would in a device. You can also change device settings, rotation, simulated device, etc. in Qt Simulator panel.

Building Applications for Symbian Devices

The Windows version of Nokia Qt SDK already includes the Symbian compiler that you can use to build applications for Symbian devices.

After developing your Qt application (see steps above), switch to Projects mode (Ctrl+5) and choose Symbian Device build target. If the project doesn't have the Symbian Device build target, click the "+" button to add a new target and choose "Symbian Device" (note that you must have properly configured Symbian SDK and Qt for Symbian SDK).

Qt-creator-symbian-device.png

The Debug build configuration uses WINSCW compiler, for running applications inside the Symbian S60 Emulator. The Release build configuration uses the GCCE compiler, so you can package applications as SIS files and run/deploy applications to Symbian devices.

Now you can run and test your application using Symbian S60 Emulator or a Nokia phone.

Building Symbian Applications using Remote Compiler

Nokia Qt SDK provides an experimental component called Remote Compiler to build Symbian applications for non-Windows operating systems including Ubuntu and other Linux-based OSes, and Mac OS X. Remote Compiler works by using Nokia-provided infrastructure to build your application, so you do not have to install any Symbian SDK on your computer.

To install Nokia Qt SDK Remote Compiler, during Nokia Qt SDK installation, do not choose "Full", but choose "Custom" installation. Then you can choose to install Experimental > Remote Compiler.

If you've already installed Nokia Qt SDK in "Full install" mode, you don't have to uninstall it. You can use the Nokia Qt SDK Maintenance tool to install Remote Compiler component:

  1. In Ubuntu, launch Applications > Programming > SDK-Maintenance-Tool. (Close Qt Creator first if it's currently running.)
  2. Now you can choose to install Experimental > Remote Compiler.
Nokia-qt-sdk-remote-compiler.png

After installing Nokia Qt SDK Remote Compiler, you can add the Remote Compiler as build setting in your projects.

Here are the list of build environments provided by Nokia Qt SDK Remote Compiler :

Qt-sdk-remote-compiler-environments.png

It's pretty exhaustive. And covers about all the most common options for Symbian deployment.

Note: Currently Remote Compiler support is disabled for Mac OS X. This condition may change.

Taken from:

Packaging Application as SIS File and Deploying to Symbian Device

Symbian uses the SIS Package format for application installation. Qt Creator provides built-in functionality to create SIS packages:

  1. Switch to Projects mode (Ctrl+5) in the Qt Creator sidebar.
  2. Click Symbian Device > Build, select the Release option. Note: If your project doesn't have a Symbian Device build setting yet, first make sure that you have properly installed Symbian S60 SDK and Qt for Symbian SDK, then add a new build setting for Symbian Device.
  3. Select "Show Details" in the General build settings, then change the Tool Chain from WINSCW to GCCE.
  4. Click Symbian Device > Run. Expand Create SIS Package, and change the settings if needed. The default is to package an unsigned SIS file, but you can sign the SIS file with your own Symbian Signed certificate and key file. You can also package your Symbian application with Nokia Smart Installer (which is required for publishing mobile applications to Ovi Store using Ovi Publish).
  5. Build or Run the application.
Qtcreator-symbian-run-settings.png

makesis Command-line Tool

While Qt Creator is convenient for rapid development, sometimes you want to build the SIS package file from the command line. You can use makesis tool from the Symbian SDK for this purpose.

Browse to your application directory and locate your pkg file and use the makesis tool. Refer to the image below for illustration.

QtCreator Symbian4.jpg

You will get the SIS file in your application directory.

Now you can install it to your S60 device using Ovi Suite or Bluetooth transfer.

Conclusion

As demonstrated, it is easy for the developer to start developing Symbian Applications using Qt Creator.

Especially with Qt Mobility APIs and Qt Simulator that is bundled with Nokia Qt SDK, developing Qt applications for Symbian that uses native mobile features are a straightforward process.

Previously, Symbian S60 SDKs were only available for Windows systems. Nokia Qt SDK makes developers lives easier because it is available for all desktop platforms (Windows, Linux, and Mac OS X). With Qt Creator, you can not only do cross-platform targeting but also cross-platform development.

So you can develop Symbian applications using any desktop operating system of your choice. (Some of the screenshots of Qt Creator above are captured while using the Linux-based Ubuntu 10.10 operating system.)

521 page views in the last 30 days.
×