本页内容

WaylandHardwareLayer QML Type

使父级WaylandQuickItem 使用硬件层进行渲染。更多...

Import Statement: import QtWayland.Compositor
Status: Technology preview

此类型处于技术预览阶段,可能会发生变更。

属性

详细描述

该项必须是WaylandQuickItem 的子元素或其派生元素(例如ShellSurfaceItem 或类似元素)

父级WaylandQuickItem 的 Surface 将采用特定于硬件的方式进行绘制,而非通过QtQuick 场景图的常规方式。在某些平台上,WaylandQuickItem 的当前缓冲区与场景图可在单独的步骤中进行混合。这使得客户端能够持续更新,而无需在每帧时触发合成器场景图的完整重绘。

可以通过设置 QT_WAYLAND_HARDWARE_LAYER_INTEGRATION 环境变量来覆盖首选的硬件层集成方式。

属性文档

stackingLevel : int

该属性存储了该硬件层相对于其他硬件层的堆叠层级,可用于对硬件层进行排序。也就是说,层级较高的层会渲染在层级较低的层之上。

级别为 0 的图层将按照实现定义的顺序绘制在合成器场景图之上。

如果硬件层集成支持,层级低于 0 的层将渲染在合成器场景图之下。

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