Sur cette page

Qt Wayland Client

La bibliothèque Qt Wayland Client fournit les fonctions nécessaires à une application pour agir en tant que client Wayland et se connecter à un compositeur Wayland. Dans la plupart des cas, la bibliothèque est utilisée automatiquement par le plugin QPA Wayland, et l'application elle-même n'a pas besoin d'utiliser les fonctions de la bibliothèque.

Voir Qt pour Linux pour des informations générales. Pour plus d'informations sur Wayland lui-même, voir Wayland et Qt.

La fonction cmake qt_generate_wayland_protocol_client_sources() peut être utilisée pour créer des extensions de protocole personnalisées.

Qt fournit également le module Qt Wayland Compositor pour développer des compositeurs.

Utilisation du module

L'utilisation de l'API C++ d'un module Qt nécessite l'établissement d'un lien avec la bibliothèque du module, soit directement, soit par l'intermédiaire d'autres dépendances. Plusieurs outils de construction disposent d'un support dédié à cet effet, notamment CMake et qmake.

Construction avec CMake

Utilisez la commande find_package() pour localiser le composant de module nécessaire dans le paquetage Qt6:

find_package(Qt6 REQUIRED COMPONENTS WaylandClient)
target_link_libraries(mytarget PRIVATE Qt6::WaylandClient)

Pour plus de détails, voir l'aperçu de la construction avec CMake.

Construction avec qmake

Pour configurer le module afin qu'il soit construit avec qmake, ajoutez le module comme valeur de la variable QT dans le fichier .pro du projet :

QT += waylandclient

Référence

Licences et attributions

Qt Wayland Compositor et le plugin d'intégration Qt Wayland sont disponibles sous licence commerciale auprès de The Qt Company.

En outre, Qt Wayland Compositor est disponible sous la licence publique générale GNU, version 3, tandis que le plugin d'intégration Qt Wayland est disponible sous la licence publique générale GNU Lesser, version 3 ou la licence publique générale GNU, version 2.

Voir Qt Licensing pour plus de détails.

Qt Wayland Compositor et le plugin d'intégration Qt Wayland utilisent des définitions de protocole sous les licences permissives suivantes :

Presentation Time Protocol, version 1

Licence MIT

Wayland Color Management Protocol, version 1

Licence MIT

Wayland Dialog Protocol, version 1

Licence MIT

Wayland EGLStream Controller Protocol, version 1.1.1

Licence MIT

Wayland Fractional Scale Protocol, version 1

Licence MIT

Wayland Fullscreen Shell Protocol, version unstable v1

Licence MIT

Wayland IVI Extension Protocol, version 1.9.1

Licence MIT

Wayland KDE DBus Menu Protocol, version 1

GNU Lesser General Public License 2.1 ou ultérieure

Wayland Linux Dmabuf Unstable V1 Protocol, version unstable v1, version 3

Licence MIT

Wayland Pointer Gestures Protocol, version unstable v1, version 2

Licence MIT

Wayland Pointer Warp Protocol, version version 1

Licence MIT

Wayland Primary Selection Protocol, version 1

Licence MIT

Wayland Protocol, version 1.24.0

Licence MIT

Wayland Scaler Protocol, version 2

Licence MIT

Wayland Session Management Protocol, version experimental V1

Licence MIT

Wayland Tablet Protocol, version unstable v2, version 1

Licence MIT

Wayland Text Input Protocol v1, version unstable v1

Licence MIT

Wayland Text Input Protocol v2, version unstable v2

Licence HPND

Wayland Text Input Protocol, version unstable v3

Licence MIT

Wayland Viewporter Protocol, version 1

Licence MIT

Wayland XDG Foreign Protocol, version 1

Licence MIT

Wayland XDG Output Protocol, version unstable v1, version 3

Licence MIT

Wayland XDG Shell Protocol, version 1.18

Licence MIT

Wayland XDG System Bell Protocol, version 1.18

Licence MIT

Wayland xdg-activation Protocol, version unstable v1, version 1

Licence MIT

Wayland xdg-decoration Protocol, version unstable v1, version 1

Licence MIT

Wayland xdg-toplevel-icon Protocol, version version 1

Licence MIT

Wlr Data Control Unstable V1 Protocol, version 2

Licence MIT

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