Qt for VxWorks | Qt 6.7 (original) (raw)

Contact The Qt Company for more information: https://www.qt.io/contact-us/

Supported Architectures and VxWorks Releases

If you are interested in later Qt releases, please contact Qt professional services.

Requirements for VxWorks

Qt Widgets Applications

Qt Quick 2 Applications

All features which are required for Qt Widgets applications, and in addition the following:

Supported Modules

Most essential Qt modules and some add-on modules are supported.

Supported Essential modules

Supported Add-Ons

Note: You can explicitly exclude unsupported or unused modules from the build via the -skip option when running the configure tool.

Platform Notes

With the release of Qt 5.0, Qt no longer contains its own window system implementation: QWS is no longer a supported platform. For single-process use cases, the Qt Platform Abstraction is a superior solution.

There is one plugin that is usable on VxWorks: EGLFS. The availability of this plugins depends on the configuration of Qt.

Configuring for a Specific Device

Building Qt for a given device requires a Qt6 installation for compilation host, a toolchain and a sysroot. Additionally, some devices require vendor specific adaptation code for EGL and OpenGL 2.0 support.

Before running configure and building Qt 6 it is required to open VxWorks Development Shell in command prompt.

Below is an example configuration for the BD-SL-i.MX6. For most VxWorks boards the configure command looks very similar. By default, Qt 6 is configured to use shared libraries. To build Qt 6 statically, add -static option for configure.

./configure
-cmake-generator "Ninja"
-icu
-no-feature-timezone
-no-feature-vulkan
-platform vxworks-clang
-qt-host-path
-sysroot /fsl_imx6__VSB
-qpa "eglfs"
-DQT_QPA_EGLFS_INTEGRATION=eglfs_viv
-prefix /sd0:1/qt6rtp
-extprefix /qt6rtp
-nomake tools
-nomake examples

It is recommended to build Qt 6 using a shadow build. See Qt Configure Options for more information.

Building and Installing Qt 6

Platform Plugins for VxWorks Devices

EGLFS

EGL is an interface between OpenGL and the native windowing system. Qt can use EGL for context and surface management. However, the API contains no platform specifics. The creation of a native window (which will not necessarily be an actual window on the screen) must still be done by platform-specific means. Hence the need for the board or GPU specific adaptation code. Such adaptations are provided either as EGLFS hooks, a single source file compiled in to the platform plugin, or as dynamically loaded EGL device integration plugins.

EGLFS is a platform plugin for running Qt 6 applications on top of EGL and OpenGL ES 2.0 without an actual windowing system (like X11 or Wayland). In addition to Qt Quick 2 and native OpenGL applications it supports software-rendered windows (for example QWidget) too. In the latter case the widgets' contents are rendered using the CPU into images which are then uploaded into textures and composited by the plugin.

This is the recommended plugin for modern VxWorks devices that include a GPU.

EGLFS forces the first top-level window (either a QWidget or a QQuickView) to become fullscreen. This window is also chosen to be the root widget window into which all other top-level widgets (for example dialogs, popup menus or combobox dropdowns) are composited. This is necessary because with EGLFS there is always exactly one native window and EGL window surface, and these belong to the widget or window that is created first. This approach works well when there is a main window that exists for the entire lifetime of the application and all other widgets are either non top-levels or are created afterwards, once the main window is shown.

There are further restrictions for OpenGL-based windows. As of Qt 6.7, EGLFS supports a single, fullscreen GL window (for example, an OpenGL-based QWindow, a QQuickView or a QGLWidget). Opening additional OpenGL windows or mixing such windows with QWidget-based content is not supported and will terminate the application with an error message.

If necessary, EGLFS can be configured via environment variables:

In addition to QT_QPA_EGLFS_DEBUG, EGLFS also supports the more modern categorized logging system of Qt. The following logging categories are available:

Running Qt Applications

The following example shows how to start an application when Qt 6 is built using shared libraries. With a statically built Qt 6, there is no need to use the LD_LIBRARY_PATH environment variable. This variable is only needed to point the location of VxWorks shared libraries (for example libc and OpenGL ES 2.0). It is not needed for Qt 6 static libraries.

putenv "LD_LIBRARY_PATH=/sd0:1/lib" cd "/sd0:1" rtpSp("", 200, 0x100000, 0, 0x01000000)

Limitations

Video Memory

Systems with a fixed amount of dedicated video memory may need extra care before running Qt application based on Qt Quick or classes like QOpenGLWidget. The default setting may be insufficient for such applications, especially when they are displayed on a high resolution (for example, full HD) screen. In this case they might start failing in unexpected ways. It is therefore recommended to ensure that there is at least 128 MB of GPU memory available. For systems that do not have a fixed amount of memory reserved for the GPU this is not an issue.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.