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 版提供,而 Qt Wayland 集成插件则根据GNU 宽通用公共许可证第 3 版或GNU 通用公共许可证第 2 版提供。
更多详情,请参阅Qt Licensing。
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 许可 |
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.