summaryrefslogtreecommitdiffstats
path: root/doc/src/platforms/qpa.qdoc
blob: 7719ce94961e12113d9e3321f0dae987a75ac4dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
/****************************************************************************
**
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:FDL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/

/*!
\page qpa.html
\title 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 \c QPlatform* classes. There
are several \e root classes, such as \c QPlatformIntegration and
\c QPlatformWindow for window system integration and \c 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.)

\section1 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:

\list
\li \c{qtbase/src/plugins/platforms/minimal/}
\li \c{qtbase/src/plugins/platforms/minimalegl/}
\endlist

The \c qminimal plugin is used for tools that link against \l{Qt GUI}, but do
not require window system integration (for example, \c qmlplugindump).
It also has diagnostic support for dumping window contents to image files
as determined by environment variables.

\section1 Class Overview

\list
\li QPlatformIntegration
    \list
    \li QAbstractEventDispatcher
    \li QPlatformAccessibility
    \li QPlatformBackingStore
    \li QPlatformClipboard
    \li QPlatformCursor
    \li QPlatformDrag
    \li QPlatformFontDatabase
    \li QPlatformGraphicsBuffer
    \li QPlatformInputContext
    \li QPlatformNativeInterface
    \li QPlatformOffscreenSurface
    \li QPlatformOpenGLContext
    \li QPlatformScreen
    \li QPlatformServices
    \li QPlatformSharedGraphicsCache
    \li QPlatformSurface
    \li QPlatformWindow
    \endlist

\li QPlatformTheme
    \list
    \li QPlatformDialogHelper
    \li QPlatformMenu
    \li QPlatformMenuBar
    \li QPlatformMenuItem
    \li QPlatformSystemTrayIcon
    \li platform palettes
    \li platform fonts
    \li theme hints
    \endlist
\endlist

\c{qtbase/src/platformsupport} contains several helper classes for implementing
platform plugins on Unix-like systems.

\section1 QPA Plugins

The following table summarizes the platform plugins available for QPA:

\table
\header
    \li Plugin Name
    \li Plugin Class Name
    \li Description
\row
    \li \c qandroid
    \li QAndroidPlatformIntegration
    \li \l{Qt for Android}{Android support}
\row
    \li \c qbsdfb
    \li QBsdFbIntegration
    \li BsdFb support
\row
    \li \c qcocoa
    \li QCocoaIntegrationPlugin
    \li \l{Qt for macOS}{Cocoa support}
\row
    \li \c qdirect2d
    \li QWindowsDirect2DIntegrationPlugin
    \li Similar to the \c qwindows plugin, but replaces the raster paint engine
        with a Direct2D-based paint engine for QPixmap and QBackingStore.
\row
    \li \c qdirectfb
    \li QDirectFbIntegrationPlugin
    \li DirectFB is centered around \e surfaces, which are the equivalent of a
        QPaintDevice.
\row
    \li \c qeglfs
    \li QEglFSIntegrationPlugin
    \li \l{embedded eglfs}{EGLFS} support for embedded Linux devices.
\row
    \li \c qhaiku
    \li QHaikuIntegration
    \li Haiku support
\row
    \li \c qios
    \li QIOSIntegrationPlugin
    \li \l{Qt for iOS}{iOS support}
\row
    \li \c qlinuxfb
    \li QLinuxFbIntegrationPlugin
    \li \l LinuxFB support for embedded Linux devices.
\row
    \li \c qmirclient
    \li QMirClientIntegration
    \li Mir client support
\row
    \li \c qopenwf
    \li QOpenWFDIntegrationPlugin
    \li OpenWF Display support for managing display control hardware.
\row
    \li \c qqnx
    \li QQnxIntegrationPlugin
    \li \l{Qt for QNX}{QNX support}
\row
    \li \c qvnc
    \li QVncIntegration
    \li VNC support
\row
    \li \c qwasm
    \li QWasmIntegration
    \li \l{Qt for WebAssembly}{WebAssembly support}
\row
    \li \c qwayland
    \li \list
            \li QWaylandIntegrationPlugin
            \li QWaylandBrcmEglPlatformIntegrationPlugin
            \li QWaylandEglPlatformIntegrationPlugin
            \li QWaylandXCompositeEglPlatformIntegrationPlugin
            \li QWaylandXCompositeGlxPlatformIntegrationPlugin
        \endlist
    \li \l{Qt Wayland Compositor}{Wayland support}
\row
    \li \c qwindows
    \li QWindowsIntegrationPlugin
    \li \l{Qt for Windows}{Windows support}
\row
    \li \c qwinrt
    \li QWinRTIntegrationPlugin
    \li \l{Qt for UWP}{Universal Windows Platform (UWP) support}
        \note This plugin was originally written for \WinRT (Windows Runtime),
        and is therefore called \c qwinrt.

\row
    \li \c qxcb
    \li QXcbIntegrationPlugin
    \li \l{Qt for Linux/X11}{X Window System (X11) support}
\row
    \li \c webgl
    \li QWebGLIntegrationPlugin
    \li \l{Qt Quick WebGL}{WebGL} support for Qt Quick applications
\endtable
*/