- Qt 5.3
- Platform and Compiler Notes - BlackBerry
- Qt 5.3.2 Reference Documentation

# Platform and Compiler Notes - BlackBerry

This page lists features and restrictions that are particular for Qt on BlackBerry 10.

## Supported Modules

Most Qt modules (essential and add-on) are supported except for instance Qt WebKit and platform-specific ones. BlackBerry supported modules shows a detailed list of what is supported and what isn't.

## Application Window

The first top-level window that is shown will always be full screen. This parent-less window serves as the application window, all other windows descend from it, even if they don't have a parent from Qt's perspective. It is not possible to re-parent this window to another window and when it is deleted any other window will vanish, as well.

In general, it is not possible to promote child windows to top level windows (setParent() with an argument of `0`). If you do so, the window will vanish along with its child windows.

## Working Directory

Applications are restricted to their working directory (aka sandbox), they cannot read or write outside this directory. Nevertheless absolute file paths are visible, for instance calling QDir::currentPath() will initially yield `/accounts/1000/appdata/namespace.application/`. This is the root directory an application is confined to. A more detaild overview how to work with the file system can be found in the corresponding BlackBerry 10 documentation.

## Application Lifecycle

A detailed overview of the states an application can move through can be found here. Most of the transitions are mapped to Qt signals and events. For instance, if the application is minimized a QGuiApplication::applicationStateChanged signal is emitted with an argument of `Qt::ApplicationInactive` and a QExposeEvent is sent to the application window. In the cases where this is not sufficient, a native event filter can be use, that listens for navigator events. The navigator on the BlackBerry 10 OS handles the entire application window lifecycle.

## Peculiarities

This is a list of topics specific to Blackberry 10 which are discussed in their own sections:

- Native events
- QSettings
- Cover windows

## Multimedia

Restrictions that apply to Qt Multimedia on BlackBerry are described here.

## Sensors

Most sensors are supported on BlackBerry (such as accelerometer, compass, magnetometer, gyroscope, (IR) proximity, (ambient) light, orientation, rotation and holster sensors). However, different devices might support a different set of sensors. QSensor::sensorTypes() will return a list of sensors that are supported on a particular device.

## Relationship to Cascades

Cascades is the prevailing UI framework for BlackBerry 10 development. It uses Qt (4.8) C++ and QML as a base to provide a standard set of UI controls and other APIs tailored to the BlackBerry 10 platform. If you are curious, take a look at the Introduction to Cascades article. Note that Cascades uses its own backend to render on the screen and uses only non-UI parts of Qt. It is not possible to mix Qt and Cascades APIs to access the screen in one application.

## References

- BlackBerry 10 device characteristics