WaylandQuickItem QML Type
提供表示WaylandView 的Qt Quick 项目 ... 更多...
Import Statement: | import QtWayland.Compositor |
In C++: | QWaylandQuickItem |
Inherited By: |
属性
- bufferLocked : bool
- compositor : WaylandCompositor
- focusOnClick : bool
- origin : enum
- output : WaylandOutput
- paintEnabled : bool
- subsurfaceHandler : object
- surface : WaylandSurface
- touchEventsEnabled : bool
信号
- void surfaceDestroyed()
方法
- point mapFromSurface(point point)
- point mapToSurface(point point)
- setPrimary()
详细说明
Qt Quick-基于 Wayland 的合成器可使用此类型在输出设备上显示客户端的内容。它将用户输入传递给客户端。
属性文档
bufferLocked : bool |
该属性显示项目的缓冲区当前是否锁定。只要缓冲区处于锁定状态,就不会释放并返回给客户端。
默认值为 false。
compositor : WaylandCompositor |
此属性保存此WaylandQuickItem 渲染的曲面的合成器。
focusOnClick : bool |
该属性用于指定WaylandQuickItem 在被点击或触摸时是否应获得焦点。
默认值为true
。
origin : enum |
此属性表示QWaylandQuickItem 的原点。
output : WaylandOutput |
此属性用于保存显示此项目的输出。
paintEnabled : bool |
如果项目被隐藏,则返回 true,但纹理仍会更新。与通过将visible 设置为false
来隐藏项目相反,将此属性设置为false
不会阻止鼠标或键盘输入到达项目。
subsurfaceHandler : object |
该属性提供了一种覆盖默认子表面行为的方法。
默认情况下,Qt Positioning 将创建一个新的 SurfaceItem 作为该项目的子项,并保持正确的位置。
要覆盖默认值,可为该属性指定一个处理程序对象。处理程序应实现 handleSubsurfaceAdded(WaylandSurface) 函数。
ShellSurfaceItem { subsurfaceHandler: QtObject { function handleSubsurfaceAdded(child) { // create custom surface item, and connect the subsurfacePositionChanged signal } } }
此属性的默认值为null
。
surface : WaylandSurface |
此属性保存此WaylandQuickItem 渲染的曲面。
touchEventsEnabled : bool |
如果触摸事件被转发到客户端表面,则此属性为true
,否则为false
。
信号文档
void surfaceDestroyed() |
当客户端已销毁与WaylandQuickItem 关联的wl_surface
时,将发出此信号。此信号的处理程序应立即销毁WaylandQuickItem 或启动关闭动画,然后销毁该项目。
如果启动了动画,则应设置bufferLocked ,以确保项目在动画结束前保持其内容。
注: 相应的处理程序是onSurfaceDestroyed
。
另请参阅 bufferLocked 。
方法文档
setPrimary() |
使WaylandQuickItem 成为曲面的主视图。
© 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.