Details
-
Type:
Task
-
Status: Closed
-
Priority:
P2: Important
-
Resolution: Done
-
Affects Version/s: 5.12
-
Fix Version/s: 6.0.0
-
Component/s: QPA, QPA: Direct2D, QPA: DirectFB, QPA: EGLFS, QPA: KMS, QPA: LinuxFB, QPA: Wayland, QPA: WebGL, QPA: Windows, QPA: X11/XCB
-
Labels:None
-
Epic Link:
Description
Platforms are today represented as platform plugins in src/plugins/platforms, and we expose platform specific functionality in various ad-hock ways:
- QPlatformNativeInterface, a QPA-internal class with functions such as:
- void *nativeResourceForWindow(const QByteArray &resource, QWindow *window)
- QFunctionPointer platformFunction(const QByteArray &function)
- Plumbed out to QGuiApplication::platformFunction
- QtPlatformHeaders, a header-only module with no binary compatibility promise, only source compatibility
- QtMacExtras, QtX11Extras
All of these require plumbing and boilerplate to expose platform-specific functionality.
One way to improve on this situation is to move platforms into src/platforms, as libraries, with their own private headers. The plugins will then just be thin wrappers to dynamically load a platform, linking to the corresponding platform library.
Users who want to use platform-specific functionality can then do e.g. QT += macos-private, include the relevant headers such as qcocoawindow.h, and cast the QWindow's handle.
Attachments
Issue Links
- relates to
-
QTBUG-75990 Extend QPA on Qt6 for all aspects of target platform
-
- Withdrawn
-
-
QTBUG-69411 XCB Plugin Changes in Qt 6
-
- Closed
-
-
QTBUG-81876 Research on how to re-organize the Extras [Spike]
-
- Closed
-
-
QTBUG-68847 Qt Wayland Changes planned for Qt 6
-
- Closed
-