Qt Wayland Client
The Qt Wayland Client library provides the necessary functions for an application to act as a Wayland client and connect to a Wayland compositor. For most use cases, the library is used automatically through the Wayland QPA plugin, and there is no need for the application itself to use any functions from the library.
See Qt for Linux for general information. For more information about Wayland itself, see Wayland and Qt.
The cmake function qt_generate_wayland_protocol_client_sources() can be used to create custom protocol extensions.
Qt also provides the Qt Wayland Compositor module for developing compositors.
Using the Module
Using a Qt module's C++ API requires linking against the module library, either directly or through other dependencies. Several build tools have dedicated support for this, including CMake and qmake.
Building with CMake
Use the find_package() command to locate the needed module component in the Qt6 package:
find_package(Qt6 REQUIRED COMPONENTS WaylandClient)
target_link_libraries(mytarget PRIVATE Qt6::WaylandClient)
For more details, see the Build with CMake overview.
Building with qmake
To configure the module for building with qmake, add the module as a value of the QT variable in the project's .pro file:
QT += waylandclient
Reference
Licenses and Attributions
Qt Wayland Compositor and the Qt Wayland integration plugin are available under commercial licenses from The Qt Company.
In addition, Qt Wayland Compositor is available under the GNU General Public License, version 3, while the Qt Wayland integration plugin is available under the GNU Lesser General Public License, version 3 or the GNU General Public License, version 2.
See Qt Licensing for further details.
Qt Wayland Compositor and the Qt Wayland integration plugin use protocol definitions under following permissive licenses: