WaylandOutput QML Type

提供对由合成器管理的可显示区域的访问。更多

Import Statement: import QtWayland.Compositor
In C++: QWaylandOutput

属性

详细说明

WaylandOutput 管理合成器几何图形范围内的矩形区域,用于显示客户端内容。例如,这可以是由WaylandCompositor 管理的屏幕。

该类型对应于 Wayland 协议中的wl_output 接口。

注: 如果合成器有多个 Wayland 输出,则必须在构建QGuiApplication 对象之前设置Qt::AA_ShareOpenGLContexts 属性。

属性文档

automaticFrameCallback : bool

该属性表示WaylandOutput 是否会在渲染时自动发送帧回调。

默认为 true。


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

该属性控制WaylandOutput 的大小是否与其窗口大小相匹配。

如果该属性为 "true",以前添加的所有模式都将被与窗口大小和屏幕刷新率相匹配的模式所取代。

默认为假。


subpixel : enum

.SubpixelUnknown(子像素未知) 该属性用于保存WaylandOutput 的子像素排列。

  • WaylandOutput.SubpixelUnknown 未设置子像素排列。
  • WaylandOutput.SubpixelNone 没有子像素。
  • WaylandOutput.SubpixelHorizontalRgb 子像素按红、绿、蓝顺序水平排列。
  • WaylandOutput.SubpixelHorizontalBgr 子像素按蓝、绿、红顺序水平排列。
  • WaylandOutput.SubpixelVerticalRgb 子像素按红、绿、蓝顺序垂直排列。
  • WaylandOutput.SubpixelVerticalBgr 子像素按蓝、绿、红顺序垂直排列。

默认为WaylandOutput.SubpixelUnknown。


transform : enum

此属性保存QWaylandCompositor 为补偿QWaylandOutput 的方向而应用于曲面的变换。

默认值为WaylandOutput.TransformNormal。


window : Window

该属性用于保存WaylandOutput 的窗口。

注意: 该属性只能设置一次,即在WaylandOutput 组件完成之前。


© 2025 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.