3.9.9. Qt graphics framework
Qt is a powerful C++ toolkit for writing cross-platform graphics applications, enabling a single code base to run predictably and perform well on Windows and embedded platforms,
Please refer https://www.qt.io/ for additional details on Qt.
The PSDK target file system includes the pre-built Qt libraries under
/usr/lib
and a rich set of Qt demo applications under
/usr/share/examples
.
3.9.9.1. Demos
Qt provides demos for the Null Window System / KMS / DRM / EGL Full Screen
(EGLFS) backends. By default EGLFS will use the eglfs_kms
backend.
$ /usr/share/examples/opengl/hellogles3/bin/hellogles3 -platform eglfs
$ /usr/share/examples/opengl/2dpainting/bin/2dpainting -platform eglfs
$ /usr/share/examples/opengl/openglwindow/bin/openglwindow -platform eglfs
For more information about the EGLFS platform abstraction and using Qt6 in embedded applications see:
3.9.9.2. Qt platform abstraction
The Qt6 within PSDK is prebuilt with Wayland enabled and therefore wayland-egl
is the default Qt Platform Abstraction (QPA). Therefore all Qt applications
should run on top of Weston. To run Qt application without Weston, the user can
use -platform
option to specify the desired QPA as linuxfb
or eglfs
.
Note
The linuxfb
interface is deprecated and requires switching the display
into “legacy” framebuffer mode.
For example:
$ /usr/share/examples/opengl/2dpainting/bin/2dpainting -platform eglfs
3.9.9.3. Running Qt applications with the Weston In-Vehicle Infotainment shell
To run the Qt application with In-Vehicle Infotainment (IVI) shell, set the
following environment variable, QT_WAYLAND_SHELL_INTEGRATION=ivi-shell
.
$ export QT_WAYLAND_SHELL_INTEGRATION=ivi-shell