QWaylandWlShell Class

QWaylandWlShell 类是桌面风格用户界面的扩展。更多

头文件: #include <QWaylandWlShell>
CMake: find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor)
target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor)
qmake: QT += waylandcompositor
在 QML 中: WlShell
继承于QWaylandShellTemplate

公共函数

QWaylandWlShell()
QWaylandWlShell(QWaylandCompositor *compositor)

重新实现的公共函数

virtual void initialize() override

信号

void wlShellSurfaceCreated(QWaylandWlShellSurface *shellSurface)
void wlShellSurfaceRequested(QWaylandSurface *surface, const QWaylandResource &resource)

静态公共成员

const struct wl_interface *interface()

详细说明

QWaylandWlShell 扩展提供了一种将QWaylandWlShellSurface 与常规 Wayland 表面关联起来的方法。通过使用外壳表面接口,客户端可以请求调整表面大小、移动等。

WlShell 对应于 Wayland 界面 。wl_shell

成员函数文档

QWaylandWlShell::QWaylandWlShell()

构造一个 QWaylandWlShell 对象。

QWaylandWlShell::QWaylandWlShell(QWaylandCompositor *compositor)

为提供的compositor 构建一个 QWaylandWlShell 对象。

[override virtual] void QWaylandWlShell::initialize()

重新实现:QWaylandCompositorExtension::initialize().

初始化WlShell 扩展名。

[static] const struct wl_interface *QWaylandWlShell::interface()

返回QWaylandWlShell 的 Wayland 界面。

[signal] void QWaylandWlShell::wlShellSurfaceCreated(QWaylandWlShellSurface *shellSurface)

该信号在客户端创建了wl_shell_surface 时发出。常见的使用情况是让该信号的处理程序实例化 QWaylandShellSurfaceItem 或QWaylandQuickItem ,以便在QtQuick 场景中显示shellSurface

[signal] void QWaylandWlShell::wlShellSurfaceRequested(QWaylandSurface *surface, const QWaylandResource &resource)

当客户端请求将wl_shell_surfacesurface 关联时,就会发出该信号。该信号的处理程序可为resource 创建一个外壳表面,并在信号发射范围内对其进行初始化。否则,QWaylandWlShellSurface 将自动创建。

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