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 表面关联的方法。通过 shell 表面接口,客户端可以请求调整该表面的大小、移动位置等操作。
WlShell 对应于 Wayland 接口wl_shell 。
要在合成器中提供 shell 扩展的功能,请创建 WlShell 组件的实例,并将其添加到合成器支持的扩展列表中:
import QtWayland.Compositor.WlShell
WaylandCompositor {
WlShell {
// ...
}
}Signal 文档
void wlShellSurfaceCreated(WlShellSurface shellSurface)
当客户端创建了wl_shell_surface 时,会发出此信号。一个常见的用例是让该信号的处理程序实例化ShellSurfaceItem 或WaylandQuickItem ,以便在QtQuick 场景中显示shellSurface 。
注意: 相应的处理程序 是onWlShellSurfaceCreated 。
void wlShellSurfaceRequested(WaylandSurface surface, WaylandResource resource)
当客户端请求将wl_shell_surface 与surface 关联时,会发出此信号。该信号的处理程序可在信号发出期间为resource 创建一个shell surface并对其进行初始化。否则,系统将自动创建一个WlShellSurface 。
注意: 相应的处理程序 是onWlShellSurfaceRequested 。
© 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.