Channels ▼


Qt Application Development for Symbian

Development of the Application

Before you start developing a Qt based application for Symbian, it is recommended that you register to Ovi Publisher. You will get a publisher identifier (UID), a certificate installer, and a developer certificate/key pair, which is needed during development and testing. The registration fee is 1 Euro. There is no additional fee on publishing to the Ovi Store. We will describe these concepts later in the article and in which phase these are needed. For more details, see (and especially note the checklist for publishers).

The example in use, including all the files can be found at In this specific case, we have used an example based on Qt Quick — a simple Calculator (the example comes with Qt itself in folder $QTDIR\demos\declarative\calculator).

The desktop runtime itself is a good alternative for quick application development if your application doesn't depend on target platform or Qt mobility APIs.

With Qt Simulator, you can test Qt applications that are intended for mobile devices in an environment similar to that of the device. You can change the information that the device has about its configuration and environment.

In Projects mode, select Qt Simulator and specify the needed Build and Run Settings for the project. Once done, Run the project and you will see how the application is launched in the simulator.

In the screen shot, you can see how the Calculator application has been launched in the Simulator which has N8 look and feel.

[Click image to view at full size]
Calculator application launched in the Simulator.

The QML Viewer is an application for loading QML documents that makes it easy to quickly develop and debug QML applications. It invokes the QML runtime to load QML documents and also includes additional features useful for the development of QML-based applications.

Build and Debug on Device

Once you are done with testing the application on your desktop, it is time build the application for the device. However, before doing that, it is important to understand what platform security on Symbian devices is all about.

To prevent the execution of unauthorized applications and to protect the end user, Symbian OS has platform security. For developers, this means that all the applications need to be signed prior to installation to a device. Signing authorizes applications to be both installed to a device and controls application access to mobile-specific data. Many basic applications can live with capabilities that can be self-signed for development purposes (so called "basic capabilities"). A later commercial deployment requires signing by Nokia. Whenever you use a feature that requires a special capability, you need to write the capability to the project file (.pro) that you can open up from the file view on the left hand side. Under the Symbian-tag you should see TARGET.CAPABILITY keyword.

In cases where Restricted or Manufacturer capabilities (CommDD, DiskAdmin, NetworkControl, MultimediaDD, AllFiles, TCB or DRM) are needed, signing needs to happen in Symbian Signed, where a publisher ID is required (and you need to have a company to get one). However, it is very rare that an application would need these kinds of capabilities, so in majority of cases, you can have your application signed via the Ovi publisher program. This is the recommended approach (since it is free of charge).

In the Calculator example, no specific capabilities are needed.

Just to illustrate how capabilities are specified in the .pro file, the following code snippet is given where Location, NetworkServices and ReadUserData capabilities are specified.

symbian {
                NetworkServices \

The best source to confirm required capabilities is the reference documentation for Qt and Qt Mobility — capabilities are documented in dedicated sections. For more information about different capabilities, see

Build for Device

Select Symbian Device as the Target (as in Figure 1) and build the application.

[Click image to view at full size]
Figure 1.

Run applications on your device connected to your development PC via USB. Qt Creator will automatically detect your Nokia devices. Launching is done from the IDE itself. The Run Settings should look like Figure 2 (the Device information has been queried from the device).

[Click image to view at full size]
Figure 2.

Also, in Run Settings dialog, you should specify the developer certificates you get from Ovi Publisher Program in the Create SIS package deployment dialog. This is needed if your application requires more capabilities than the basic capability set provides. Applications signed with a developer certificate are locked to a particular mobile device (or set of devices) and always display a warning that the application is untrusted on installation; see Figure 3.

[Click image to view at full size]
Figure 3.

Debug applications on your device. This is also supported for Symbian devices. The debug agent must be installed on the device, which can be done at the same time that the needed runtimes are installed on the device (Install TRK Debug Agent) to Symbian^3 device from Qt SDK menu. This is a powerful feature when debugging issues that are happening only in the device.

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.