WlShell QML Type
为桌面风格的用户界面提供扩展。更多
Import Statement: | import QtWayland.Compositor.WlShell |
In C++: | QWaylandWlShell |
信号
- void wlShellSurfaceCreated(WlShellSurface shellSurface)
- void wlShellSurfaceRequested(WaylandSurface surface, WaylandResource resource)
详细说明
WlShell 扩展提供了一种将ShellSurface 与常规 Wayland 表面相关联的方法。客户端可以使用外壳表面接口请求调整表面大小、移动等。
WlShell 与 Wayland 界面wl_shell
相对应。
要在合成器中提供 shell 扩展的功能,请创建一个 WlShell 组件实例,并将其添加到合成器支持的扩展列表中:
import QtWayland.Compositor.WlShell WaylandCompositor { WlShell { // ... } }
信号文档
void wlShellSurfaceCreated(WlShellSurface shellSurface) |
该信号在客户端创建了wl_shell_surface
时发出。常见的用例是让该信号的处理程序实例化ShellSurfaceItem 或WaylandQuickItem ,以便在QtQuick 场景中显示shellSurface 。
注: 相应的处理程序是onWlShellSurfaceCreated
。
void wlShellSurfaceRequested(WaylandSurface surface, WaylandResource resource) |
当客户端请求将wl_shell_surface
与surface 关联时,将发出此信号。该信号的处理程序可为resource 创建一个外壳表面,并在信号发射范围内将其初始化。否则,将自动创建一个WlShellSurface 。
注: 相应的处理程序是onWlShellSurfaceRequested
。
© 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.