在本页

QWaylandClientExtension Class

用于在 Wayland 协议上实现自定义扩展的类。更多

头文件: #include <QWaylandClientExtension>
CMake: find_package(Qt6 REQUIRED COMPONENTS WaylandClient)
target_link_libraries(mytarget PRIVATE Qt6::WaylandClient)
qmake: QT += waylandclient
继承: QObject
继承于:

QWaylandClientExtensionTemplate

属性

公共功能

QWaylandClientExtension(const int ver)
virtual ~QWaylandClientExtension()
bool isActive() const
int version() const

信号

详细说明

QWaylandClientExtension 类可用于实现 Wayland 协议的自定义扩展。该扩展必须由合成器支持才能使用。请参阅 Qt Wayland Compositor中的自定义扩展示例。

为方便起见,该类通常不直接继承,而是通过QWaylandClientExtensionTemplate 继承。

属性文档

[read-only] active : bool

此属性表示扩展的激活状态。

如果扩展名当前处于活动状态,则设置为true 。否则,该属性为false

访问功能:

bool isActive() const

通知信号:

void activeChanged()

[read-only] protocolVersion : int

此属性表示协议的版本。

该属性保存已请求的协议版本。

访问功能:

int version() const

Notifier 信号:

void versionChanged()

成员函数 文档

QWaylandClientExtension::QWaylandClientExtension(const int ver)

构建客户端扩展,并将其版本设为ver

[virtual noexcept] QWaylandClientExtension::~QWaylandClientExtension()

销毁客户端扩展。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.