Qt Platform Abstraction: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
=Qt Platform Abstraction=
[[Category:Developing_with_Qt::Qt 5]]<br />h1. Qt Platform Abstraction


'''English''' | [[Qt Platform Abstraction SimplifiedChinese|中文]]
'''English''' | [[:Qt_Platform_Abstraction_SimplifiedChinese|中文]]


<span class="caps">QPA</span> is the platform abstraction layer for [[Qt-5|Qt 5]] and replaces <span class="caps">QWS</span> and the platform ports from Qt 4. You can learn about it at this video presentation:
QPA is the platform abstraction layer for [[Qt 5]] and replaces QWS and the platform ports from Qt 4. You can learn about it at this video presentation:


* [http://qt.io/videos/watch/qpa-the-qt-platform-abstraction <span class="caps">QPA</span> – The Qt Platform Abstraction] ''[qt.io]'' by Thomas Senyk.
* &quot;QPA - The Qt Platform Abstraction&amp;quot;:http://qt.io/videos/watch/qpa-the-qt-platform-abstraction by Thomas Senyk.


There is currently little documentation for <span class="caps">QPA</span>. The best approach for developing a new platform plugin is to [http://qt.gitorious.net/qt/qtbase/trees/master/src/plugins/platforms look at the other plugins] ''[qt.gitorious.net]'' and see how they implement the <span class="caps">API</span>s in question. The [http://qt.gitorious.net/qt/qtbase/trees/master/src/plugins/platforms/minimal minimal] ''[qt.gitorious.net]'' plugin is a good starting point. The xcb, windows, cocoa, and qnx plugins are also actively developed and up to date.
There is currently little documentation for QPA. The best approach for developing a new platform plugin is to &quot;look at the other plugins&amp;quot;:http://qt.gitorious.net/qt/qtbase/trees/master/src/plugins/platforms and see how they implement the APIs in question. The &quot;minimal&amp;quot;:http://qt.gitorious.net/qt/qtbase/trees/master/src/plugins/platforms/minimal plugin is a good starting point. The xcb, windows, cocoa, and qnx plugins are also actively developed and up to date.


<span class="caps">QPA</span> plugins are implemented by subclassing various QPlatform* classes. There are two “root” classes: QPlatformIntegration for window system integration and QPlatformTheme for deeper platform theming and integration. QStyle is not a part of <span class="caps">QPA</span>.
QPA plugins are implemented by subclassing various QPlatform* classes. There are two &quot;root&amp;quot; classes: QPlatformIntegration for window system integration and QPlatformTheme for deeper platform theming and integration. QStyle is not a part of QPA.


The <span class="caps">API</span>s provided by QPlatformIntegration are at this point ([[Qt-5-Alpha|Qt 5 Alpha]]) mostly stable. QPlatformTheme still has ongoing development. There<br /> are no source or binary compatibility guarantees for the <span class="caps">QPA</span> classes, meaning that a platform plugin is only guaranteed to work with the Qt version it was developed against. <span class="caps">API</span> changes will however only be made in minor releases. (5.1, 5.2, and so on.)
The APIs provided by QPlatformIntegration are at this point ([[Qt 5 Alpha]]) mostly stable. QPlatformTheme still has ongoing development. There<br />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.)


==Class Overview==
== Class Overview ==


[http://qt.gitorious.net/qt/qtbase/trees/master/src/platformsupport src/platformsupport] ''[qt.gitorious.net]'' contains several helper classes for implementing platform plugins on unix-like systems.
<code>QPlatformIntegration<br /> QPlatformWindow<br /> QPlatformBackingStore<br /> QPlatformOpenGLContext<br /> QPlatformSharedGraphicsCache<br /> QPlatformFontDatabase<br /> QPlatformClipboard<br /> QPlatformDrag<br /> QAbstractEventDispatcher<br /> QPlatformInputContext<br /> QPlatformAccessibility<br /> QPlatformNativeInterface<br /> QPlatformServices


A basic introduction to various <span class="caps">QPA</span> classes can be on this blog [http://qforever.wordpress.com/2012/04/10/qt-platform-abstraction-starter-guide/ post] ''[qforever.wordpress.com]'' .
QPlatformTheme<br /> QPlatformMenu<br /> QPlatformMenuBar<br /> QPlatformDialogHelper<br /> platform palettes<br /> platform fonts<br /> theme hints</code>


===Categories:===
&quot;src/platformsupport&amp;quot;:http://qt.gitorious.net/qt/qtbase/trees/master/src/platformsupport contains several helper classes for implementing platform plugins on unix-like systems.
 
* [[:Category:Developing with Qt|Developing_with_Qt]]
** [[:Category:Developing with Qt::Qt-5|Qt 5]]

Revision as of 14:21, 23 February 2015


h1. Qt Platform Abstraction

English | 中文

QPA is the platform abstraction layer for Qt 5 and replaces QWS and the platform ports from Qt 4. You can learn about it at this video presentation:

There is currently little documentation for QPA. The best approach for developing a new platform plugin is to "look at the other plugins&quot;:http://qt.gitorious.net/qt/qtbase/trees/master/src/plugins/platforms and see how they implement the APIs in question. The "minimal&quot;:http://qt.gitorious.net/qt/qtbase/trees/master/src/plugins/platforms/minimal plugin is a good starting point. The xcb, windows, cocoa, and qnx plugins are also actively developed and up to date.

QPA plugins are implemented by subclassing various QPlatform* classes. There are two "root&quot; classes: QPlatformIntegration for window system integration and QPlatformTheme for deeper platform theming and integration. QStyle is not a part of QPA.

The APIs provided by QPlatformIntegration are at this point (Qt 5 Alpha) mostly stable. QPlatformTheme still has ongoing development. 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.)

Class Overview

QPlatformIntegration<br /> QPlatformWindow<br /> QPlatformBackingStore<br /> QPlatformOpenGLContext<br /> QPlatformSharedGraphicsCache<br /> QPlatformFontDatabase<br /> QPlatformClipboard<br /> QPlatformDrag<br /> QAbstractEventDispatcher<br /> QPlatformInputContext<br /> QPlatformAccessibility<br /> QPlatformNativeInterface<br /> QPlatformServices

QPlatformTheme<br /> QPlatformMenu<br /> QPlatformMenuBar<br /> QPlatformDialogHelper<br /> platform palettes<br /> platform fonts<br /> theme hints

"src/platformsupport&quot;:http://qt.gitorious.net/qt/qtbase/trees/master/src/platformsupport contains several helper classes for implementing platform plugins on unix-like systems.