Qt Reference Documentation

Platform and Compiler Notes - QNX

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

Note that Qt Commercial 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. Officially supported QPA is intended to be available for Qt Commercial 5.0 port for QNX.

Qt Commercial for QNX contains 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

Qt Commercial has been tested on QNX 6.5 on i386 and ARM/ARM-v7 targets with QNX's default gcc compiler.

Module Status

Modules for general software developmentStatus
QtCoreCore non-graphical classes used by other modulesSupported
QtGuiGraphical user interface (GUI) componentsSupported
QtMultimediaClasses for low-level multimedia functionalityNot available
QtNetworkClasses for network programmingSupported
QtOpenGLOpenGL support classesNot available
QtOpenVGOpenVG support classesNot available
QtScriptClasses for evaluating Qt ScriptsSupported
QtScriptToolsAdditional Qt Script componentsSupported
QtSqlClasses for database integration using SQLSupported
QtSvgClasses for displaying the contents of SVG filesSupported
QtWebKitClasses for displaying and editing Web contentSupported
QtXmlClasses for handling XMLSupported
QtXmlPatternsAn XQuery & XPath engine for XML and custom data modelsSupported
QtDeclarativeAn engine for declaratively building fluid user interfaces.Supported
PhononMultimedia framework classesNot available
Qt3SupportQt 3 compatibility classesSupported
Modules for working with Qt's tools
QtDesignerClasses for extending Qt DesignerSupported
QtUiToolsClasses for handling Qt Designer forms in applicationsSupported
QtHelpClasses for online helpSupported
QtTestTool classes for unit testingSupported
Modules for Windows developers
QAxContainerExtension for accessing ActiveX controlsNot available
QAxServerExtension for writing ActiveX serversNot available
Modules for Unix developers
QtDBusClasses for Inter-Process Communication using the D-BusNot available

Disabled Features

FeatureNotes
NIS supportNetwork Information ServiceNot available
CUPS supportCommon UNIX Printing SystemNot available
Iconv supportNot available
Glib supportNot available
GStreamer supportNot available
Audio supportNot available
Session managementSession managementNot available
ICD supportInternet Connectivity DaemonNot available
libICU supportInternational Components for UnicodeNot available
SXE supportSafe Execution EnvironmentNot available

Platform Regressions

Qt for QNX's behavior is mostly identical with Qt for Embedded Linux, however, there are some regressions.

  • QDateTime computation around year 0 and year 1970, which have been tracked back to faulty time zone data on some QNX versions.
  • QString::localeAwareCompare() only works for C locale.
  • QTranslator's default locale-based fallback mechanism doesn't work.
  • QSystemSemaphore: Due to POSIX semaphores limitations, the semaphore operations aren't automatically undone when the process terminates. This potentially may lead to unexpected lock-ups in applications which does use the SysV semaphores behavior.

Other Limitations

  • Currently Webkit cannot be cross-compiled on a Windows host platform.
  • Only MinGW is supported for compiling host tools on Windows host platform.

Development environment setup

  • Install QNX Software Development Platform 6.5.x.
  • On Windows, MinGW compiler is needed for the host tools.

Build Instructions

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

Configuration

Example configure line for cross-compiling Qt for QNX for ARM target on Linux host:

 ./configure -xplatform qws/qnx-armv7-g++ -embedded arm -no-gfx-linuxfb -no-mouse-linuxtp -no-kbd-tty -no-mouse-pc -qt-mouse-qnx -qt-kbd-qnx -qt-gfx-qnx -depths 16,24,32,generic -exceptions
  • -xplatform qws/qnx-armv7-g++ - selects the armv7-g++ mkspec for QNX
  • -embedded arm - builds the embedded version of Qt and sets the architecture to arm
  • -no-gfx-linuxfb, -no-mouse-linuxtp, -no-mouse-pc and -no-kbd-tty are Linux specific and won't work on QNX
  • -exceptions - enables exception support needed for QtXmlPatterns
  • -qt-mouse-qnx - enables the devi-hid based mouse driver
  • -qt-kbd-qnx - enables the devi-hid based keyboard driver
  • -qt-gfx-qnx - enables the io-graphics based screen driver
  • -depths 16,24,32,generic - enables all modes supported by the QNX screen driver

Example configure line for cross-compiling Qt for QNX for ARM target on Windows host:

 configure.exe -xplatform qws/qnx-armv7-g++ -embedded -arch arm -hostprefix %CD% -prefix /usr/local/Trolltech/QtEmbedded-4.8.2-arm -no-webkit
  • -xplatform qws/qnx-armv7-g++ - selects the armv7-g++ mkspec for QNX
  • -embedded - builds the embedded version of Qt
  • -arch arm - builds for arm architecture
  • -hostprefix %CD% - sets Qt location in host machine to current directory
  • -prefix /usr/local/Trolltect/QtEmbedded-4.8.2-arm - sets Qt location in target machine
  • -no-webkit - disables QtWebkit, since it cannot be build on a Windows host

Target device configuration

  • To enable the QNX screen 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.
  • QWS windowing system requires a ramdisk to work correctly. Use following boot script to create it:
     # create 8M ramdisk /dev/hd1t77 for /qtembedded-0
     # must 'dinit -h' and mount
     devb-ram ram capacity=8192 &
     waitfor /dev/hd1
     dinit -hq /dev/hd1t77
     mount /dev/hd1t77 /ramdrive

    In addition, the TMPDIR environment variable needs to point to the ramdisk

  • On i386 target, disable Photon from starting at boot by creating empty file to /etc/system/config/nophoton