Auf dieser Seite

QWaylandXdgShell Class

Die Klasse „QWaylandXdgShell“ ist eine Erweiterung für Benutzeroberflächen im Desktop-Stil. Mehr...

Header: #include <QWaylandXdgShell>
CMake: find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor)
target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor)
qmake: QT += waylandcompositor
In QML: XdgShell
Erbt von: QWaylandShellTemplate

Öffentliche Funktionen

QWaylandXdgShell()
QWaylandXdgShell(QWaylandCompositor *compositor)

Neu implementierte öffentliche Funktionen

virtual void initialize() override

Öffentliche Slots

uint ping(QWaylandClient *client)

Signale

void pong(uint serial)
void popupCreated(QWaylandXdgPopup *popup, QWaylandXdgSurface *xdgSurface)
void toplevelCreated(QWaylandXdgToplevel *toplevel, QWaylandXdgSurface *xdgSurface)
void xdgSurfaceCreated(QWaylandXdgSurface *xdgSurface)

Statische öffentliche Mitglieder

const struct wl_interface *interface()

Ausführliche Beschreibung

Die Erweiterung „QWaylandXdgShell“ bietet die Möglichkeit, eine „ QWaylandXdgToplevel “ oder „ QWaylandXdgPopup “ mit einer regulären Wayland-Oberfläche zu verknüpfen. Über die Schnittstelle „ QWaylandXdgToplevel “ kann der Client anfordern, dass die Oberfläche in der Größe angepasst, verschoben usw. wird.

QWaylandXdgShell entspricht der Wayland-Schnittstelle „ xdg_shell “.

Dokumentation der Mitgliedsfunktionen

[explicit] QWaylandXdgShell::QWaylandXdgShell()

Erstellt ein QWaylandXdgShell-Objekt.

[explicit] QWaylandXdgShell::QWaylandXdgShell(QWaylandCompositor *compositor)

Erstellt ein QWaylandXdgShell-Objekt für das angegebene „ compositor “.

[override virtual] void QWaylandXdgShell::initialize()

Implementiert: QWaylandCompositorExtension::initialize().

Initialisiert die Shell-Erweiterung.

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

Gibt die Wayland-Schnittstelle für die „ QWaylandXdgShell “ zurück.

[slot] uint QWaylandXdgShell::ping(QWaylandClient *client)

Sendet ein Ping-Ereignis an client. Wenn der Client auf das Ereignis antwortet, wird das Signal „ pong “ ausgelöst.

[signal] void QWaylandXdgShell::pong(uint serial)

Dieses Signal wird ausgelöst, wenn der Client auf ein Ping-Ereignis mit der Seriennummer „ serial “ geantwortet hat.

Siehe auch ` QWaylandXdgShell::ping()`.

[signal] void QWaylandXdgShell::popupCreated(QWaylandXdgPopup *popup, QWaylandXdgSurface *xdgSurface)

Dieses Signal wird ausgelöst, wenn der Client ein „ xdg_popup “ erstellt hat. Ein häufiger Anwendungsfall besteht darin, den Handler dieses Signals ein „QWaylandShellSurfaceItem“ oder „ QWaylandQuickItem “ instanziieren zu lassen, um „ popup “ in einer „ QtQuick “-Szene anzuzeigen.

xdgSurface ist das XdgSurface, für das popup das Rollenobjekt darstellt.

[signal] void QWaylandXdgShell::toplevelCreated(QWaylandXdgToplevel *toplevel, QWaylandXdgSurface *xdgSurface)

Dieses Signal wird ausgelöst, wenn der Client ein ` xdg_toplevel` erstellt hat. Ein häufiger Anwendungsfall besteht darin, den Handler dieses Signals ein `QWaylandShellSurfaceItem` oder ` QWaylandQuickItem ` instanziieren zu lassen, um ` toplevel ` in einer ` QtQuick `-Szene anzuzeigen.

xdgSurface ist das XdgSurface, für das toplevel das Rollenobjekt darstellt.

[signal] void QWaylandXdgShell::xdgSurfaceCreated(QWaylandXdgSurface *xdgSurface)

Dieses Signal wird ausgelöst, wenn der Client ein „ xdg_surface “ erstellt hat. Beachten Sie, dass „ xdgSurface “ nicht zugeordnet ist, d. h. gemäß dem „ xdg-shell “-Protokoll sollte es nicht angezeigt werden, bis ein Rollenobjekt empfangen wurde.

Siehe auch toplevelCreated() und popupCreated().

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