WaylandOutput QML Type (Uncreatable)
提供对由合成器管理的可视区域的访问。更多...
| Import Statement: | import QtWayland.Compositor |
| In C++: | QWaylandOutput |
注意:此类型无法创建。无法在 QML 中实例化。
属性
- automaticFrameCallback : bool
- availableGeometry : rect
- compositor : WaylandCompositor
- geometry : rect
- manufacturer : string
- model : string
- physicalSize : size
- position : point
- scaleFactor : int
- sizeFollowsWindow : bool
- subpixel : enum
- transform : enum
- window : Window
详细说明
WaylandOutput 管理合成器几何边界内的一个矩形区域,用于显示客户端内容。例如,这可以是WaylandCompositor 管理的屏幕。
该类型对应于 Wayland 协议中的 `wl_output ` 接口。
注意:如果 合成器具有多个 Wayland 输出,则必须在构建 `QGuiApplication ` 对象之前设置 `Qt::AA_ShareOpenGLContexts ` 属性。
属性文档
automaticFrameCallback : bool [default: true]
该属性用于指定WaylandOutput 在渲染时是否自动发送帧回调。
availableGeometry : rect
该属性存储了WaylandOutput 用于显示内容的几何信息。可用几何信息位于输出坐标系中,以(0,0)为原点,默认大小与输出区域相同。
另请参阅 QWaylandOutput::geometry 。
compositor : WaylandCompositor
该属性用于指定在该WaylandOutput 上显示内容的合成器。
注意:此 属性只能在WaylandOutput 组件完成之前设置一次。
geometry : rect [read-only]
该属性存储了WaylandOutput 的几何信息。
manufacturer : string
该属性包含由该WaylandOutput 管理的显示器的制造商的文本描述。
model : string
该属性包含由该WaylandOutput 管理的显示器型号的文本描述。
physicalSize : size
该属性存储WaylandOutput 的物理尺寸(单位为毫米)。
另请参阅 QWaylandOutput::geometry 。
position : point
该属性存储了该WaylandOutput 在合成器坐标系中的位置。
scaleFactor : int
该属性存储了WaylandCompositor 在显示表面缓冲区之前对其进行缩放的缩放因子。该属性用于高密度输出设备,因为在这些设备上,未经缩放的内容会过小而无法实际使用。如果客户端希望提供适合输出设备的高分辨率内容,则可以相应地设置其缓冲区的缩放因子以匹配输出设备。
默认值为 1(不进行缩放)。
sizeFollowsWindow : bool [default: false]
该属性控制WaylandOutput 的尺寸是否与窗口尺寸匹配。
如果该属性为真,则之前添加的所有模式将被替换为一种与窗口大小和屏幕刷新率相匹配的模式。这在开发过程中使用嵌套合成器设置时特别有用。
subpixel : enum
该属性存储了此WaylandOutput 的子像素排列方式。
- WaylandOutput.SubpixelUnknown 未设置亚像素排列。
- WaylandOutput.SubpixelNone 没有子像素。
- WaylandOutput.SubpixelHorizontalRgb 子像素按红色、绿色、蓝色的顺序水平排列。
- WaylandOutput.SubpixelHorizontalBgr 子像素按蓝色、绿色、红色的顺序水平排列。
- WaylandOutput.SubpixelVerticalRgb 子像素按红、绿、蓝的顺序垂直排列。
- WaylandOutput.SubpixelVerticalBgr 子像素按蓝色、绿色、红色的顺序垂直排列。
默认值为WaylandOutput.SubpixelUnknown。
transform : enum
该属性存储了QWaylandCompositor 对曲面应用的变换,用于补偿QWaylandOutput 的朝向。
- WaylandOutput.TransformNormal 方向为法向。
- WaylandOutput.TransformNormal 方向为法向。.Transform90 方向旋转了 90 度。
- WaylandOutput.Transform180 方向旋转了 180 度。
- WaylandOutput.Transform270 方向旋转了 270 度。
- WaylandOutput.TransformFlipped 方向被镜像。
- WaylandOutput.TransformFlipped90 方向先进行镜像翻转,然后旋转 90 度。
- WaylandOutput.TransformFlipped180 方向先进行镜像翻转,然后旋转 180 度。
- WaylandOutput.TransformFlipped270 方向先进行镜像翻转,然后旋转 270 度。
默认值为WaylandOutput.TransformNormal。
window : Window
该属性保存了此WaylandOutput 的Window对象。
注意:此 属性只能在WaylandOutput 组件完成之前设置一次。
© 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.