XdgDecorationManagerV1 QML Type

为协商服务器端和客户端窗口装饰提供扩展。更多

Import Statement: import QtWayland.Compositor.XdgShell
In C++: QWaylandXdgDecorationManagerV1

属性

详细说明

XdgDecorationManagerV1 扩展为合成器提供了一种宣布支持服务器端窗口装饰的方式,也为 xdg-shell 客户端提供了一种沟通方式,以确定他们更喜欢客户端还是服务器端装饰。

XdgDecorationManagerV1 与 Wayland 接口zxdg_decoration_manager_v1 相对应。

要在合成器中提供扩展功能,需要创建 XdgDecorationManagerV1 组件的实例,并将其添加到合成器支持的扩展列表中:

import QtWayland.Compositor

WaylandCompositor {
    // Xdg decoration manager assumes xdg-shell is being used
    XdgShell {
        onToplevelCreated: // ...
    }
    XdgDecorationManagerV1 {
        // Provide a hint to clients that support the extension they should use server-side
        // decorations.
        preferredMode: XdgToplevel.ServerSideDecoration
    }
}

另请参阅 QWaylandXdgToplevel::decorationMode服务器端装饰编辑器

属性文档

preferredMode : string

此属性表示合成器偏好的装饰模式。

对于未指定偏好服务器端或客户端装饰的客户端,将使用这种模式。


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