Qt Wayland Client
Qt Wayland Client 库为应用程序提供了作为Wayland客户端并连接到 Wayland 合成器所需的必要函数。在大多数使用场景中,该库会通过 Wayland QPA 插件自动调用,应用程序本身无需直接使用该库中的任何函数。
有关一般信息,请参阅《Qt for Linux》。有关 Wayland 本身的更多信息,请参阅《Wayland 与 Qt》。
可以使用 cmake 函数qt_generate_wayland_protocol_client_sources()来创建自定义协议扩展。
Qt 还提供了 Qt Wayland Compositor 模块用于开发合成器。
使用该模块
要使用 Qt 模块的 C++ API,需要直接或通过其他依赖项将程序链接到该模块库。包括CMake和qmake 在内的多种构建工具都对此提供了专门的支持。
使用 CMake 进行构建
使用find_package() 命令在Qt6 软件包中定位所需的模块组件:
find_package(Qt6 REQUIRED COMPONENTS WaylandClient)
target_link_libraries(mytarget PRIVATE Qt6::WaylandClient)更多详情,请参阅“使用 CMake 构建”概述。
使用 qmake 构建
要配置模块以便使用 qmake 进行构建,请在项目的 .pro 文件中将该模块作为QT 变量的值添加:
QT += waylandclient参考
许可与归属
Qt Wayland Compositor 和 Qt Wayland 集成插件均由The Qt Company 提供,并受商业许可约束。
此外,Qt Wayland Compositor 遵循GNU 通用公共许可证第 3 版(GNU General Public License, version 3)发布,而 Qt Wayland 集成插件则遵循GNU 较宽松通用公共许可证第 3 版(GNU Lesser General Public License, version 3)或GNU 通用公共许可证第 2 版(GNU General Public License, version 2)发布。
更多详细信息请参阅Qt 许可。
Qt Wayland Compositor 以及 Qt Wayland 集成插件使用的协议定义均遵循以下宽松许可:
MIT 许可证 | |
MIT 许可证 | |
MIT 许可证 | |
MIT 许可证 | |
MIT 许可证 | |
MIT 许可协议 | |
MIT 许可协议 | |
GNU 较宽松通用公共许可证 2.1 或更高版本 | |
Wayland Linux Dmabuf Unstable V1 Protocol, version unstable v1, version 3 | MIT 许可协议 |
MIT 许可协议 | |
Wayland Pointer Gestures Protocol, version unstable v1, version 2 | MIT 许可协议 |
MIT 许可协议 | |
MIT 许可协议 | |
MIT 许可协议 | |
MIT 许可协议 | |
Wayland Session Management Protocol, version experimental V1 | MIT 许可协议 |
MIT 许可协议 | |
MIT 许可协议 | |
HPND 许可协议 | |
MIT 许可协议 | |
MIT 许可协议 | |
MIT 许可协议 | |
MIT 许可协议 | |
MIT 许可协议 | |
MIT 许可协议 | |
Wayland xdg-activation Protocol, version unstable v1, version 1 | MIT 许可协议 |
Wayland xdg-decoration Protocol, version unstable v1, version 1 | MIT 许可协议 |
MIT 许可协议 | |
MIT 许可协议 |
© 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.