Nesta página

QWaylandXdgShell Class

A classe QWaylandXdgShell é uma extensão para interfaces de usuário no estilo desktop. Mais...

Cabeçalho: #include <QWaylandXdgShell>
CMake: find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor)
target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor)
qmake: QT += waylandcompositor
No QML: XdgShell
Herdado de: QWaylandShellTemplate

Funções públicas

QWaylandXdgShell()
QWaylandXdgShell(QWaylandCompositor *compositor)

Funções públicas reimplementadas

virtual void initialize() override

Slots públicos

uint ping(QWaylandClient *client)

Sinais

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

Membros públicos estáticos

const struct wl_interface *interface()

Descrição detalhada

A extensão QWaylandXdgShell oferece uma maneira de associar um QWaylandXdgToplevel ou QWaylandXdgPopup a uma superfície Wayland comum. Usando a interface QWaylandXdgToplevel, o cliente pode solicitar que a superfície seja redimensionada, movida e assim por diante.

O QWaylandXdgShell corresponde à interface Wayland xdg_shell.

Documentação das funções de membro

[explicit] QWaylandXdgShell::QWaylandXdgShell()

Cria um objeto QWaylandXdgShell.

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

Cria um objeto QWaylandXdgShell para o ` compositor` fornecido.

[override virtual] void QWaylandXdgShell::initialize()

Reimplementa: ` QWaylandCompositorExtension::initialize()`.

Inicializa a extensão do shell.

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

Retorna a interface Wayland para o ` QWaylandXdgShell`.

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

Envia um evento de ping para client. Se o cliente responder ao evento, o sinal pong será emitido.

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

Esse sinal é emitido quando o cliente responde a um evento de ping com o valor serial “ serial ”.

Veja também QWaylandXdgShell::ping().

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

Este sinal é emitido quando o cliente cria um ` xdg_popup`. Um caso de uso comum é permitir que o manipulador desse sinal instancie um `QWaylandShellSurfaceItem` ou um ` QWaylandQuickItem ` para exibir ` popup ` em uma cena ` QtQuick `.

xdgSurface é o XdgSurface ao qual o popup se refere.

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

Este sinal é emitido quando o cliente cria um ` xdg_toplevel`. Um caso de uso comum é permitir que o manipulador desse sinal instancie um `QWaylandShellSurfaceItem` ou um ` QWaylandQuickItem ` para exibir ` toplevel ` em uma cena ` QtQuick `.

xdgSurface é o XdgSurface ao qual o toplevel está vinculado.

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

Esse sinal é emitido quando o cliente cria um objeto ` xdg_surface`. Observe que ` xdgSurface ` não é mapeado; ou seja, de acordo com o protocolo xdg-shell, ele não deve ser exibido até que tenha recebido um objeto de função.

Veja também toplevelCreated() e 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.