Qt5实战之Qt Platform Abstraction
QPA (Qt Platform Abstraction) 即Qt平台抽象层,移植自Qt4,在Qt5中替代QWS(Qt Window System)
QPA插件通过子类化不同的QPlatform*类来实现。QPA中有两个基类:QPlatformIntergration窗口系统集成和QPlatformTheme 深入平台主题和集成。 QStyle 不是QPA的一部分。
类概览
类名(QPlatformIntegration基类) | 描述 |
---|---|
QAbstractEventDispatcher | $12 |
QPlatformAccessibility | $1 |
QPlatformBackingStore | $1 |
QPlatformClipboard | $1 |
QPlatformCursor | $1 |
QPlatformDrag | $1 |
QPlatformFontDatabase | $1 |
QPlatformGraphicsBuffer | $1 |
QPlatformInputContext | $1 |
QPlatformNativeInterface | $1 |
QPlatformOffscreenSurface | $1 |
QPlatformOpenGLContext | $1 |
QPlatformScreen | $1 |
QPlatformServices | $1 |
QPlatformSharedGraphicsCache | $1 |
QPlatformSurface | $1 |
QPlatformWindow | $1 |
类名(QPlatformTheme基类) | 描述 |
---|---|
QPlatformDialogHelper | $1 |
QPlatformMenu | $1 |
QPlatformMenuBar | $1 |
QPlatformMenuItem | $1 |
QPlatformSystemTrayIcon | $1 |
platform palettes | $1 |
platform fonts | $1 |
theme hints | $1 |
src/platformsupport 包含了几个在类unix(unix-like)系统中实现平台插件有帮助的类。
编译配置
1、使用qmake编译,,在*.pro文件中添加
QT += gui-private
2、使用cmake编译,在CMakeLists.txt添加
find_package(Qt5Gui)
include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS})
注意:qt4.7及其以下的版本用 platformsupport-private 选项