Qt Platform Abstraction
The Qt Platform Abstraction (QPA) is the platform abstraction layer for Qt 5 and replaces Qt for Embedded Linux and the platform ports from Qt 4.
QPA plugins are implemented by subclassing various
QPlatform* classes. There are several root classes, such as
QPlatformWindow for window system integration and
QPlatformTheme for deeper platform theming and integration. QStyle is not a part of QPA.
There are no source or binary compatibility guarantees for the QPA classes, meaning that a platform plugin is only guaranteed to work with the Qt version it was developed against. API changes will however only be made in minor releases. (5.1, 5.2, and so on.)
QPA Minimal Plugins
There is no detailed tutorial documentation for writing QPA plugins at this time. However, there are two minimal plugins shipped with Qt 5 for testing and other special purposes that you can use as examples:
qminimal plugin is used for tools that link against Qt GUI, but do not require window system integration (for example,
qmlplugindump). It also has diagnostic support for dumping window contents to image files as determined by environment variables.
qtbase/src/platformsupport contains several helper classes for implementing platform plugins on Unix-like systems.
The following table summarizes the platform plugins available for QPA:
|Plugin Name||Plugin Class Name||Description|
|QWindowsDirect2DIntegrationPlugin||Similar to the |
|QDirectFbIntegrationPlugin||DirectFB is centered around surfaces, which are the equivalent of a QPaintDevice.|
|QEglFSIntegrationPlugin||EGLFS support for embedded Linux devices.|
|QLinuxFbIntegrationPlugin||LinuxFB support for embedded Linux devices.|
|QMirClientIntegration||Mir client support|
|QOpenWFDIntegrationPlugin||OpenWF Display support for managing display control hardware.|
|QWinRTIntegrationPlugin||Universal Windows Platform (UWP) support|
Note: This plugin was originally written for WinRT (Windows Runtime), and is therefore called
|QXcbIntegrationPlugin||X Window System (X11) support|
|QWebGLIntegrationPlugin||WebGL support for Qt Quick applications|