Qt Wayland Compositor QML Types
Qt Wayland 模块提供了可用于创建支持 Wayland 协议的自定义显示服务器的 Qml 类型。
可通过以下导入语句将这些 QML 类型导入到您的应用程序中:
import QtWayland.Compositor使用该模块
要使用 Qt 模块的 C++ API,需要链接该模块库,既可以直接链接,也可以通过其他依赖项间接链接。包括CMake和qmake 在内的多种构建工具都为此提供了专门的支持。
使用 CMake 构建
使用find_package() 命令在Qt6 软件包中定位所需的模块组件:
find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor)
target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor)更多详细信息,请参阅“使用 CMake 构建”概述。
使用 qmake 构建
要配置模块以便使用 qmake 进行构建,请在项目的 .pro 文件中将该模块作为QT 变量的值添加:
QT += waylandcompositor有关在应用程序中使用这些类型的更多信息,请参阅 Qt Wayland Compositor 文档。
提供了一个扩展,可用于禁用合成器的空闲行为 | |
提供对合成器中输入法的访问 | |
用于实现 Wayland 壳层的抽象类型 | |
为 shell 扩展指定的表面角色提供了一个通用接口 | |
用于显示 ShellSurface 并与之交互的Qt Quick 项目类型 | |
提供对合成器中输入法的访问 | |
表示连接到 WaylandCompositor 的客户端 | |
管理 Wayland 显示服务器 | |
使父级 WaylandQuickItem 使用硬件层进行渲染 | |
提供对由合成器管理的可视区域的访问 | |
该类型提供一个Qt Quick 项,该项表示Wayland客户端的显示区域 | |
提供对键盘、鼠标和触摸输入的访问 | |
表示输出设备上的一个矩形区域 |
© 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.