Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.

Qt Platform Abstraction: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
(Cleanup)
(Fix git links)
 
Line 5: Line 5:
* [https://www.youtube.com/watch?v=qCWWxBf6vko QPA - The Qt Platform Abstraction] by Thomas Senyk.
* [https://www.youtube.com/watch?v=qCWWxBf6vko QPA - The Qt Platform Abstraction] by Thomas Senyk.


There is currently little documentation for QPA. 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] and see how they implement the APIs in question. The [http://qt.gitorious.net/qt/qtbase/trees/master/src/plugins/platforms/minimal minimal] 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 [http://code.qt.io/cgit/qt/qtbase.git/tree/src/plugins/platforms look at the other plugins] and see how they implement the APIs in question. The [http://code.qt.io/cgit/qt/qtbase.git/tree/src/plugins/platforms/minimal 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" classes: QPlatformIntegration for window system integration and QPlatformTheme for deeper platform theming and integration. QStyle is not a part of QPA.
QPA 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 QPA.
Line 36: Line 36:
  theme hints</code>
  theme hints</code>


[http://qt.gitorious.net/qt/qtbase/trees/master/src/platformsupport src/platformsupport] contains several helper classes for implementing platform plugins on unix-like systems.
[http://code.qt.io/cgit/qt/qtbase.git/tree/src/platformsupport src/platformsupport] contains several helper classes for implementing platform plugins on unix-like systems.

Latest revision as of 15:20, 21 December 2016

En Ar Bg De El Es Fa Fi Fr Hi Hu It Ja Kn Ko Ms Nl Pl Pt Ru Sq Th Tr Uk Zh

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 and see how they implement the APIs in question. The 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" 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
 QPlatformWindow
 QPlatformBackingStore
 QPlatformOpenGLContext
 QPlatformSharedGraphicsCache
 QPlatformFontDatabase
 QPlatformClipboard
 QPlatformDrag
 QAbstractEventDispatcher
 QPlatformInputContext
 QPlatformAccessibility
 QPlatformNativeInterface
 QPlatformServices

QPlatformTheme
 QPlatformMenu
 QPlatformMenuBar
 QPlatformDialogHelper
 platform palettes
 platform fonts
 theme hints

src/platformsupport contains several helper classes for implementing platform plugins on unix-like systems.