XdgOutputManagerV1 QML Type
提供了一个扩展,用于以面向桌面方式描述输出。更多...
| Import Statement: | import QtWayland.Compositor.XdgShell |
| In C++: | QWaylandXdgOutputManagerV1 |
详细说明
XdgOutputManagerV1 扩展为合成器提供了一种描述输出设备的方式,该方式更符合以桌面为导向的系统中输出设备的概念。
某些信息在其他应用程序(如 IVI 系统)中可能没有意义。
通常,桌面系统上的全局合成器空间由一组连续或重叠的矩形区域组成。
XdgOutputManagerV1 对应于 Wayland 接口zxdg_output_manager_v1 。
要在合成器中提供该扩展的功能,请创建一个 XdgOutputManagerV1 组件的实例,将其添加到合成器支持的扩展列表中,并将每个XdgOutputV1 与其WaylandOutput 关联起来:
import QtWayland.Compositor
WaylandCompositor {
XdgOutputManagerV1 {
WaylandOutput {
id: output1
position: Qt.point(0, 0)
window: Window {}
XdgOutputV1 {
name: "WL-1"
logicalPosition: output1.position
logicalSize: Qt.size(output1.geometry.width / output1.scaleFactor,
output1.geometry.height / output1.scaleFactor)
}
}
WaylandOutput {
id: output2
position: Qt.point(800, 0)
window: Window {}
XdgOutputV1 {
name: "WL-2"
logicalPosition: output2.position
logicalSize: Qt.size(output2.geometry.width / output2.scaleFactor,
output2.geometry.height / output2.scaleFactor)
}
}
}
}© 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.