Qt 4.6: Platform Notes - QNX

|  | Home · All Classes · Overviews |

[Platform Notes]

# Platform Notes - QNX

Note: QNX is a community supported platform. See the Supported Platforms page for more information.

This page contains information about the Qt for QNX port. More information about the combinations of platforms and compilers supported by Qt can be found on the Supported Platforms page.

Note that Qt for QNX is currently based on Qt for Embedded Linux, which contains its own windowing system. Mixing QNX's Photon environment with Qt for QNX is currently not possible. Building Qt for QNX with Photon's X11 embedded server is not recommended due to missing support for X11 extensions, resulting in poor rendering quality.

Qt for QNX contains experimental screen and input drivers based on QNX's `devi-hid` and `io-display`. For more information, check the class documentation for QQnxScreen, QWSQnxKeyboardHandler and QQnxMouseHandler. See the Porting Qt for Embedded Linux to a New Architecture document for information on how to add custom screen or input drivers.

- Supported Versions
- Limitations
- Build Instructions
- General Notes
- Platform Regressions

## Supported Versions

Qt has been tested on QNX 6.4 on i386 and PowerPC targets with QNX's default gcc compiler.

## Limitations

Some of Qt's functionality is currently not available on QNX:

Function | Notes
--- | ---
QProcess | Not available - QNX doesn't support mixing threads and processes.
QSharedMemory | Not available - QNX doesn't support SYSV style shared memory.
QSystemSemaphore | Not available - QNX doesn't support SYSV style system semaphores.
QWS Multi Process | QT_NO_QWS_MULTIPROCESS is always on due to missing shared memory support.
Phonon | There is no standard audio backend, which could be integrated into Phonon.
Qt3Support | The Qt3Support library is not available on QNX.

## Build Instructions

Qt for QNX needs to be built either on a QNX system, or cross-compiled on a Linux host. In either case, The QNX Software Development Platform must be installed.

Example configure line for cross-compiling Qt for QNX on a Linux host for an i386 QNX target:

     configure -xplatform unsupported/qws/qnx-i386-g++ -embedded i386 -no-gfx-linuxfb -no-mouse-linuxtp -no-kbd-tty -no-qt3support -qt-gfx-qnx -qt-mouse-qnx -qt-kbd-qnx -no-exceptions

- `-xplatform unsupported/qws/qnx-i386-g++` - selects the i386-g++ mkspec for QNX
- `-embedded i386` - builds the embedded version of Qt and sets the architecture to i386
- `-no-gfx-linuxfb`, `-no-mouse-linuxtp` and `-no-kbd-tty` are Linux specific and won't work on QNX
- `-no-qt3support` - required since the Qt3 support classes are not supported on QNX
- `-no-exceptions` - reduces the size of the library by disabling exception support
- `-qt-gfx-qnx` - enables the experimental `io-graphics` based display driver
- `-qt-mouse-qnx` - enables the experimental `devi-hig` based mouse driver
- `-qt-kbd-qnx` - enables the experimental `devi-hig` based keyboard driver

## General Notes

- To enable the experimental QNX display and input drivers, `io-display` needs to be up and running. The `devi-hid` based Qt input drivers require `devi-hid` to run in resource mode without Photon support. To enable a standard mouse and keyboard combination, run `devi-hid` as follows: `/usr/photon/bin/devi-hid -Pr kbd mouse`. Note that your current shell will not accept keyboard and mouse input anymore after running that command, so run it either from a script that launches a Qt application afterwards, or make sure to have remote login available to launch a Qt application. In addition, the `QWS_DISPLAY`, `QWS_MOUSE_PROTO` and `QWS_KEYBOARD` environment variables should all be set to `qnx` before running a Qt application.
- The 3rd party TIFF library currently doesn't build due to the missing `inflateSync` symbol from QNX's `libz.so.2`. Workarounds would be to manually replace QNX's libz with a newer version, or disable the TIFF plugin entierly by appending `QT_CONFIG += no-tiff` to `.qmake.cache` after configuring Qt.
- Some of the tools, examples and demos do not compile due to dependencies on QProcess or other classes that are not available on QNX.

## Platform Regressions

Qt for QNX's behavior is mostly identical with Qt for Embedded Linux. However, some regressions were spotted in QDateTime computation around year 0 and year 1970, which have been tracked back to faulty time zone data on some QNX versions.

[Platform Notes]