Qt Reference Documentation

# Platform and Compiler Notes - Symbian

This page describes implementation details regarding the Qt for Symbian port. To get started with application development for Symbian devices, read the Connecting Symbian Devices document.

## Source Compatibility

Qt for Symbian provides the same level of source compatibility guarantee as given for other platforms. That is, a program which compiles against a given version of Qt for Symbian will also compile against all future versions of the same major release.

## Binary Compatibility

As with every supported platform, Qt strives to maintain application behavior and binary compatibility throughout the lifetime of the Qt 4.x major version and on the Symbian devices that support Qt. Symbian support in Qt SDK and Ovi Store were introduced with Qt 4.6. Each Qt release contains bug fixes that might change the API behavior and thereby affect application compatibility.

In addition, Symbian devices have different input methods, such as different keyboard styles or touch input, screen sizes, memory, and CPU and GPU capabilities. Therefore, you must test applications on specific target devices to ensure compatibility. In order to build applications that are supported also on earlier devices, select the target in Qt SDK carefully. Generally, an earlier target (such as S60 5th Edition) is supported on a larger number of devices than a later target (such as Symbian Belle).

## Supported Devices

The Support for Symbian document details the Qt support on different Symbian devices.

The Nokia Smart Installer for Symbian document lists how Qt is supported on different Symbian devices through Smart Installer.

Qt versions are supported by Symbian devices as follows:

- Qt 4.6 is supported by S60 3rd Edition feature pack 1 and newer devices through Smart Installer.
- Qt 4.7.3 is supported by S60 5th Edition and newer devices through Smart Installer.

Symbian devices have a pre-installed Qt support as follows:

- Symbian Anna: Qt 4.7.3 in C: drive. Note that Qt 4.7.4 is supported in Symbian Anna through Smart Installer.
- Symbian Belle: Qt 4.7.4 in device firmware (ROM).

## Functionality Support

The following technologies and classes are not supported:

- QtConcurrent
- QtDBus
- Printing support
- Qt3Support

The following technologies have limited support:

Module | Note
--- | ---
QtSql | The supported drivers are SQLite and QSYMSQL.
QtMultimedia | For support details see Multimedia Support section.

QtGui

QtGui's widgets are deprecated (i.e. they are available but not recommended to use) in the Symbian port. It is recommended to use Qt Quick Components for Symbian instead, because they provide better look and feel on Symbian devices.

Moreover, the following classes of QtGui should not be used in a Symbian application:

- QFileDialog with the `DontUseNativeDialog` option
- QColorDialog with the `DontUseNativeDialog` option
- QFontDialog
- QWizard
- QCalendarWidget
- QDateTimeEdit
- QMdiArea
- QDockWidget
- QMdiSubWindow
- QPrintPreviewWidget

QScrollArea: The scrolling and focus handling of QScrollArea's all scrollable widgets, for example QListView, differs from native Avkon list widgets' one. Native Avkon scrollable components support touch-gesture-based scrolling by dragging and flicking the UI component but this functionality is not implemented in Qt widgets. Scrolling by dragging and flicking works also in Qt Quick Components that implements the Symbian design guidelines.

## Compiler Notes

For the application development the necessary compiler toolchain is included in Qt SDK. For instructions compiling Qt itself see the Installing Qt for the Symbian platform document.

## Known Issues

Known issues can be found by visiting the wiki page with an up-to-date list of known issues, and the list of bugs can be found by browsing the S60 component in Qt's public task tracker, located at http://bugreports.qt-project.org/.

For information about mixing exceptions with Symbian leaves, see Exception Safety with Symbian.

## Required Capabilities

The Qt libraries are typically signed with `All -TCB` capabilites but that does not mean your Qt application needs to be signed with the same capabilities to function properly. The capabilities your application needs to function properly depends on which parts of Qt you use. In a Qt application Symbian capabilities are defined in the TARGET.CAPABILITY qmake variable in the project file. Here is an overview for which capabilities may be needed when using different modules:

Module | Required Symbian Capability
--- | ---
QtCore | `PowerMgmt` if QProcess::kill(...) or QProcess::terminate(...) is called.
QtCore | `AllFiles` when accessing specific areas.
QtDeclarative | `NetworkServices` is automatically added for this module if no capabilities are explicitly specified.
QtNetwork | `NetworkServices` is automatically added for this module if no capabilities are explicitly specified.
QtNetwork | `ReadUserData` is required to include all the phone's SSL certificates in the system's default CA certificate list (for example those added by the user or stored in the SIM card), without this capability only the CA certs built into the phone are used.
QtMultimedia | `UserEnvironment` if QAudioInput is used.
QtWebKit | `NetworkServices` is automatically added for this module if no capabilities are explicitly specified.

Note: Some modules rely on other modules. E.g. QtWebkit and QtDeclarative depend on QtNetwork and therefore any application that depends on these modules is also likely to need `NetworkServices` capability.

For more information see the documentation of the individual Qt classes. If a class does not mention Symbian capabilities, it requires none.

## Multimedia Support

Qt Mobility provides a high-level API for multimedia functionality with QtMultimediaKit. In addition, Qt provides the low-level QtMultimedia module that is internally used by the QtMultimediaKit. For more information on developing multimedia applications for Symbian devices, see Guide for Qt Multimedia Developers.

Moreover, there is a third multimedia-related module called Phonon. Qt provides two backends for the Phonon module in Symbian:

MMF and

Helix.

Note that Phonon is a legacy module and the QtMultimediaKit module is replacing Phonon in Qt 5. Although Phonon is supported in Symbian for backwards compatibility and there is no plan to remove Phonon from Symbian any new applications should use QtMultimediaKit in Symbian using Qt 4.7 bundle. The QtMultimediaKit feature set is comparable to that in Phonon.

The following applies to Phonon:

- MMF Phonon backend supports video and sound playback through Symbian's Multimedia Framework, MMF. Phonon's video playback may show artifacts when the video is moved or resized (for instance, during device orientation changes from portrait to landscape and vice versa). This problem is present on S60 5th Edition and earlier versions, as well as in Symbian Anna devices.
- The audio and video formats that Phonon supports depends on what support the platform provides for MMF. The emulator is known to have limited codec support.
- In addition, there exists a backend for the Helix framework. However, since it is not shipped with Qt, its availability depends on the Symbian platform in use. If the MFF plugin fails to load, the Helix plugin, if present on the device, will be loaded instead.

## Hardware Accelerated Rendering

The default graphics system on Symbian Anna is OpenVG, which uses OpenVG hardware to accelerate QPainter functions. There are a few exceptions, where Qt will use software rendering fallback.

Devices like the N8 and C7 only have 32Mb of GPU memory and limited support for EGL surface transparency. These devices can be identified by querying the`GL_RENDERER` or `VG_RENDERER` string which evaluates to `VideoCore III`. On these devices, Qt will use software rendering in cases listed below.

- Translucent windows
- Dialogs
- Popups

## OpenGL Support in Symbian

Qt 4.7 introduces the QtOpenGL module. QtOpenGL is supported on devices which support OpenGL ES 2.0. Symbian platforms prior to Symbian Anna (and Symbian^3) are not supported.

QGLWidget usage as a QGraphicsView viewport is not recommended on Symbian. The OpenVG graphics system is not able to manage OpenGL graphics resources. Also, a QGLWidget object is not able to release its GPU resources when the application goes to the background. If OpenGL functionality is needed, OpenGL graphics system usage is recommended. If an application decides to use QGLWidget, then it is the application's responsibility to destroy and release QGLWidget and related OpenGL resources when the application goes to the background. Otherwise, the Graphics Out Of Memory monitor may decide to kill the application as it consumes GPU resources while in the background.

Note: QGLBuffer, QGLFramebufferObject, QGLPixelBuffer, QGLShader, and QGLShaderProgram are direct GPU resources and it is the application's responsibility to manage them.

## UI Performance in S60 3rd and 5th Edition Devices

Qt uses the QPainter class to perform low-level painting on widgets and other paint devices. QPainter provides functions to draw complex shapes, aligned text and pixmaps. It can also do vector path clipping, coordinate transformations and Porter-Duff composition. If the underlying graphics architecture does not support all of these operations then Qt uses the raster graphics system for rendering.

In Symbian Anna (and Symbian^3) Qt uses hardware accelerated graphics as explained above. This is enabled by ScreenPlay Graphics Architecture in these devices.

Most of the Symbian S60 3rd and 5th Edition devices have a graphics architecture that does not have native support for all functions provided by QPainter. In these non-ScreenPlay devices Qt uses the raster graphics system by default that has a performance penalty compared to native Symbian rendering.

In order to be able to perform all functions provided by QPainter, the raster graphics system needs to have pixel level framebuffer access. To make this possible in non-ScreenPlay devices Qt has to create an additional offscreen buffer that is the target for all Qt rendering operations. Qt renders the widget tree to the offscreen buffer and the offscreen buffer is blitted to the framebuffer via Symbian Window Server.

The following table shows the rendering stacks of native Symbian and Qt in non-ScreenPlay devices.

Symbian | Qt
--- | ---

The following diagrams show a simplified sequence of drawing a pixmap in a non-ScreenPlay device.

Symbian

Qt

When compared to a native Symbian application, Qt does an additional blit to the offscreen buffer before drawing to the framebuffer. That is the performance penalty which needs to be paid to get all functionality provided by QPainter in non-ScreenPlay architecture.