Sur cette page

QWaylandXdgShell Class

La classe QWaylandXdgShell est une extension pour les interfaces utilisateur de type bureau. Plus d'informations...

En-tête : #include <QWaylandXdgShell>
CMake : find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor)
target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor)
qmake : QT += waylandcompositor
En QML : XdgShell
Hérite : QWaylandShellTemplate

Fonctions publiques

QWaylandXdgShell()
QWaylandXdgShell(QWaylandCompositor *compositor)

Fonctions publiques réimplémentées

virtual void initialize() override

Emplacements publics

uint ping(QWaylandClient *client)

Signaux

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

Membres publics statiques

const struct wl_interface *interface()

Description détaillée

L'extension QWaylandXdgShell permet d'associer un QWaylandXdgToplevel ou un QWaylandXdgPopup à une surface Wayland ordinaire. En utilisant l'interface QWaylandXdgToplevel, le client peut demander que la surface soit redimensionnée, déplacée, etc.

QWaylandXdgShell correspond à l'interface Wayland, xdg_shell.

Documentation des fonctions membres

[explicit] QWaylandXdgShell::QWaylandXdgShell()

Construit un objet QWaylandXdgShell.

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

Construit un objet QWaylandXdgShell pour l'adresse compositor fournie.

[override virtual] void QWaylandXdgShell::initialize()

Réimplémente : QWaylandCompositorExtension::initialize().

Initialise l'extension du shell.

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

Retourne l'interface Wayland pour le site QWaylandXdgShell.

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

Envoie un événement ping à client. Si le client répond à l'événement, le signal pong sera émis.

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

Ce signal est émis lorsque le client a répondu à un événement ping avec serial, serial.

Voir également QWaylandXdgShell::ping().

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

Ce signal est émis lorsque le client a créé un xdg_popup. Un cas d'utilisation courant consiste à laisser le gestionnaire de ce signal instancier un QWaylandShellSurfaceItem ou QWaylandQuickItem pour afficher popup dans une scène QtQuick.

xdgSurface est l'objet XdgSurface popup est l'objet de rôle pour.

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

Ce signal est émis lorsque le client a créé un xdg_toplevel. Un cas d'utilisation courant consiste à laisser le gestionnaire de ce signal instancier un QWaylandShellSurfaceItem ou QWaylandQuickItem pour afficher toplevel dans une scène QtQuick.

xdgSurface est l'objet XdgSurface toplevel est l'objet de rôle pour.

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

Ce signal est émis lorsque le client a créé un objet xdg_surface. Notez que xdgSurface n'est pas mappé, c'est-à-dire que selon le protocole xdg-shell, il ne doit pas être affiché, tant qu'il n'a pas reçu d'objet de rôle.

Voir également toplevelCreated() et 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.