Sur cette page

Qt Wayland Client

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

Consultez la page Qt pour Linux pour obtenir des informations générales. Pour plus d'informations sur Wayland lui-même, consultez 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 Qt Wayland Compositor module pour le développement de compositeurs.

Utilisation du module

Pour utiliser l’API C++ d’un module Qt, il faut lier le code à la bibliothèque du module, soit directement, soit via d’autres dépendances. Plusieurs outils de compilation prennent cela en charge, notamment CMake et qmake.

Compilation avec CMake

Utilisez la commande « find_package() » pour localiser le composant de module requis dans le paquet « Qt6 » :

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

Pour plus de détails, consultez la présentation « Compilation avec CMake ».

Compilation avec qmake

Pour configurer le module en vue d’une compilation avec qmake, ajoutez le module en tant que valeur de la variable ` QT ` dans le fichier `.pro` du projet :

QT += waylandclient

Référence

Licences et mentions légales

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

De plus, 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 restreinte GNU, version 3, ou sous la Licence publique générale GNU, version 2.

Voir Licences Qt 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

Licence publique générale réduite GNU 2.1 ou ultérieure

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

Licence MIT

Wayland Linux Dmabuf V1 Protocol, version v1, version 5

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.