1. Introduction to QNX qt development tools and QNX supports qt modules:
Qt is a highly recommended UI and application development platform for embedded devices powered by the QNX Neutrino Operating System. This system is not a pre-packaged software, but rather a solution for embedded development, and Qt is an integral part of this solution. Qt has been successfully ported to QNX for a long time and there is a dedicated Qt community within the QNX community to ensure seamless communication between QNX-Qt users.
In terms of support for QNX, the QNX Neutrino Real-Time Operating System provides support for almost all of the essential modules of Qt, as well as some additional components. The following modules can be utilized on the QNX Neutrino OS platform for regular builds and unit testing:
Qt essential modules | state | notes |
Qt Core | supported | |
Qt Declarative | not supported | |
Qt GUI | supported | |
Qt Multimedia | supported | not supported on x86, a few known issues |
Qt Multimedia Widgets | supported | not supported on x86, a few known issues; no platform-style |
Qt Network | supported | |
Qt QML | supported | |
Qt Quick | supported | |
Qt Quick Controls | supported | No platform style |
Qt Quick Dialogs | supported | Some native styles only |
Qt Quick Layouts | supported | |
Qt SQL | supported | |
Qt Test | supported | |
Qt WebKit QML | not supported | Depends on Qt’s Declarative |
Qt WebKit Widgets | not supported | Compiles and runs, but is not officially supported in 5.4 |
Qt Widgets | supported | No platform style |
Qt add on | state | notes |
Active Qt | not applicable | |
Enginio | not supported | |
Qt Android Extras | not applicable | |
Qt Bluetooth | not supported | no OS backed defined yet |
Qt Concurrent | supported | |
Qt D-Bus | not applicable | |
Qt Graphical Effects | supported | |
Qt Image Formats | supported | |
Qt Mac Extras | not applicable | |
Qt NFC | not supported | no OS backed defined yet |
Qt OpenGL | Only OpenGL ES 2 | |
Qt Positioning | not supported | no OS backed defined yet |
Qt Print Support | supported | only printing to pdf |
Qt Quick1 | not supported (might work) | |
Qt Script | supported | |
Qt Tools | supported | |
Qt Sensors | not supported | no OS backed defined yet |
Qt Serial Port | not supported | a backend is available; a candidate for a future release |
Qt SVG | supported | |
Qt WebSockets | not supported | |
Qt Windows Extras | not applicable | |
Qt X11 Extras | not applicable | |
Qt XML | supported | |
Qt XML Patterns | partly supported | XPath functionality is supported, but XML schema validation is not supported |
“Supported” modules are provided in the binary Qt installers for QNX.
To utilize Qt on QNX, you must first acquire the software. There are two options for obtaining Qt:
- Download a pre-built custom version from either the QNX vendor or Qt company.
- Clone the Qt git source library and build the necessary submodules one by one using the main repository. The process is described in detail on the website: http://wiki.qt.io/Building_Qt_for_QNX_Neutrino_OS
Alternatively, you can compile the source code yourself. For further instructions, please refer to a related blog.
To cross-compile Qt for QNX, follow the steps outlined in the related resources.
The use of Qt can be divided into two types:
Configuring Qt development tools with the IDE Momentics provided by QNX SDP 7.0 involves the following steps:
- Obtain the Qt license key from the QNX official website.
- Download the Qt Runtime package from the QNX Software Center. This package, based on Qt 5.6.2, includes the Qt Quick Controls module, the necessary compilation tools (such as qmake, qcc, etc.) to generate executable files, and library files supporting the QNX Neutrino RTOS.
- After downloading, add the export path to your system environment variables:
- C:\Users\system_name\qnx700\qt\Qt5.6.2\win64\x86_64\target\x86_64\bin;C:\Users\system_name\qnx700\qt\Qt5.6.2\win64\x86_64\target\x86_64
- Restart your system and open the command line. Type in “qmake –query” and you should see the results displayed.

The above screenshot shows that the qt configuration under QNX is correct, then open the Momentics IDE to configure the Qt path, open windows—>Qt—>Qt installs, and add the QMake path, as shown below

Then you can develop a Qt application program under IDE.
The second method, for some development pc without QNX, how to use the above version of Qt Runtime Tools with a qt license. High, as for why 4.3.1 is provided in the QNX documentation, this article has not been verified, and the higher version 4.5.1 has been tested, and there is no problem
3. Qt application development and deployment
Setting up the Qt Creator environment
First, you must manually add Qt for QNX as a new Qt version, configure the compiler, and debugger and create the toolkit.
Add Qt version
This can be done by selecting Tools->Options->Build & Run>Qt Versions->Add and setting the path to “qmake” in the Qt for QNX build. You also need to specify the path to the QNX SDP installation to let Qt Creator verify the newly added Qt version:

Add QCC compiler
Select Tools->Options->Build & Run->Compiler-> Add->QCC and set the path of qcc compiler (/host/x86_64/usr/bin/qcc). Since qcc relies on some QNX-specific environment variables, it is also necessary to specify the path to the QNX SDP installation:

add debugger
Select Tools->Options->Build & Run->Debuggers and set it to the ntoarmv7-GDB debugger (/host/x86/usr/bin/ntoarmv7-gdb). If the target machine is x86, select ntox86-gdb:

Add QNX device
Select Tools->Options->Devices->Add->QNX Device to register the QNX device in Qt Creator.

Execute the test. If any bin file is missing, you can find it on the development machine and copy it to the corresponding location on the target machine.

It should be noted that the addition of a QNX device requires a hardware device with qnx system installed or a QNX system installed in VMware. Otherwise, the QNX device cannot be added correctly, and if it cannot be added, the following development kit cannot be added and compilation cannot be performed.
add kit
Select Tools->Options->Build & Run->Kits->Add to add a new kit that uses the QNX device, Qt version, compiler, and debugger set up in the above steps:

4. Compile and deploy
Once your new project is complete, use the previously configured tools to compile it. If successful, you can then deploy the Qt5 Runtime to the target machine. In order for the application to run, the lib, plugins, and qml import files of Qt5 must be accessible from the application’s location. There are two options for achieving this:
- Copy the Qt Runtime to the corresponding location on the target system.
- Mount the folder containing the Qt Runtime and binaries to the board using NFS. This method is convenient during development as the files remain on the host PC and can be easily modified, leading to a shorter development and testing cycle.
4. Deploy Qt Runtime
To set up the Qt5 environment on a QNX board, follow these steps:
- Copy the “lib”, “plugins”, and “qml” folders from the Qt installation to a target folder on the QNX file system, such as a new “qt5” folder in the “/usr” directory. Only the necessary files should be copied for simplification purposes.
- Deploy the compiled application to the QNX system and execute it from a remote shell on the target machine. The following prerequisites must be met:
- i. The QNX target is running the “Screen Graphics Subsystem”.
- ii. The Qt Runtime environment variables are set as described in the next section.
- Set the following environment variables on the QNX board:
- i. LD_LIBRARY_PATH is set to the path of the Qt library, “/lib”.
- ii. QT_PLUGIN_PATH defines the location of the Qt plugin and should be set to “/plugins”.
- iii. QML2_IMPORT_PATH defines the location of Qt Quick2 and should be set to “/qml”.
- iv. QT_QPA_FONTDIR, if Qt does not use fontconfig, must define the path of the font used by Qt, which can be set to “/lib/fonts”.
- v. QQNX_PHYSUCAL_SCREEN_SIZE defines the height and width of the application display area on the screen in millimeters, which may be set by some boot images during global booting. This variable determines the final size displayed on the screen and can be set to “150, 90” (adjust as needed according to the specific situation).
5. Platform and Compiler Instructions
To deploy a Qt program on QNX Neutrino RTOS, the following requirements must be met:
- QNX Screen Graphics Subsystem must be running.
- IPv6 support must be enabled.
- The /dev/random device must exist and be functional.
- The system logger, slog2, must be started during system startup.
- A set of environment variables must be set.
- The physical screen size must be provided to Qt if it is invalid.
- Third-party libraries such as libfontconfig, libfreetype, libiconv, libicui18n, libicudata, libicuuc, libpng16, libxml14, libsqlite3, libssl, and libcrypto must be included in the system image.
- Troubleshooting can be done by setting environment variables such as QT_DEBUG_PLUGINS, LD_DEBUG, and QT_LOGGING_TO_CONSOLE.
- A Chinese-supported library, such as NotoSans, must be downloaded if the program requires a Chinese display.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <!-- /etc/fonts/fonts.conf file to configure system font access --> <fontconfig> <!-- Font directory list --> <dir>/usr/share/fonts</dir> <dir prefix="xdg">fonts</dir> <!-- the following element will be removed in the future --> <dir>~/.fonts</dir> <!-- Accept deprecated 'mono' alias, replacing it with 'monospace' --> <match target="pattern"> <test qual="any" name="family"> <string>mono</string> </test> <edit name="family" mode="assign" binding="same"> <string>monospace</string> </edit> </match> <!-- Accept alternate 'sans serif' spelling, replacing it with 'sans-serif' --> <match target="pattern"> <test qual="any" name="family"> <string>sans serif</string> </test> <edit name="family" mode="assign" binding="same"> <string>sans-serif</string> </edit> </match> <!-- Accept deprecated 'sans' alias, replacing it with 'sans-serif' --> <match target="pattern"> <test qual="any" name="family"> <string>sans</string> </test> <edit name="family" mode="assign" binding="same"> <string>sans-serif</string> </edit> </match> <!-- Load local system customization file --> <include ignore_missing="yes">conf.d</include> <!-- Font cache directory list --> <cachedir>/usr/fontconfig</cachedir> <cachedir prefix="xdg">fontconfig</cachedir> <!-- the following element will be removed in the future --> <cachedir>~/.fontconfig</cachedir> <config> <!-- Rescan configuration every 30 seconds when FcFontSetList is called --> <rescan> <int>30</int> </rescan> </config> </fontconfig>
To resolve the issue of the failing load config file, you can either add the environment variable “export FONTCONFIG_FILE=/qt5/lib/fontconfig/local.conf” or create a new local.conf as described above and set the environment variable “export FONTCONFIG_PATH=/qt5/lib/fontconfig/”. The difference between these two options is whether you are specifying the location of a file or a folder.
QNX lib not found or load error solution
The error is as follows:
# ./test This application failed to start because it could not find or load the Qt platform plugin "qnx" in "/usr/qt5/plugins/platforms". Available platform plugins are: minimal (from /usr/qt5/plugins/platforms), offscreen (from /usr/qt5/plugins/platforms), qnx (from /usr/qt5/plugins/platforms), minimal, offscreen, qnx. Reinstalling the application may fix this problem. Abort (core dumped)
The reason for not seeing the QNX library is to confirm whether the corresponding lib plugins qml environment variable is set, and at the same time confirm whether the screen is started normally. For other reasons, please refer to the requirements of the qt running configuration for the correct execution of the qt app.
Workaround for this error:
To set up the Qt environment on your target machine, follow these steps:
- Create a new “qt5” folder under “usr” and copy the “qml”, “lib”, and “plugins” folders from the cross-compilation chain to this new folder.
- Add the following environment variables in the “.profile” file under “etc”:
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/qt5/lib
- export QT_PLUGIN_PATH=/usr/qt5/plugin
- export QML2_IMPORT_PATH=/usr/qt5/qml
- export QQNX_PHYSICAL_SCREEN_SIZE=150,90
- export QT_DEBUG_PLUGINS=1
- export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/qt5/plugins/ platforms
- export QT_QPA_FONTDIR=/usr/qt5/lib/fonts
- Restart the system.
- Start the screen.
- To debug any missing libraries, run the following command:
- export LD_DEBUG=libs openglwindow
- Finally, execute the openglwindow program by running the command “$./openglwindow”.