- Qt 6.4
- Qt Wayland Compositor
- C++ Classes
- QWaylandResource
- Qt Wayland Compositor | Commercial or GPLv3

# QWaylandResource Class

QWaylandResource is a container for a `wl_resource`. More...

Header: | #include <QWaylandResource>
CMake: | find_package(Qt6 REQUIRED COMPONENTS Waylandcompositor) target_link_libraries(mytarget PRIVATE Qt6::Waylandcompositor)
qmake: | QT += waylandcompositor
Since: | Qt 5.8

- List of all members, including inherited members

## Public Functions

| QWaylandResource(wl_resource *resource)
| QWaylandResource()
wl_resource * | resource() const

## Detailed Description

The QWaylandResource is a simple wrapper around the Wayland type `wl_resource`, and makes it possible to use wl_resource pointers in Qt Quick APIs.

See also Qt Wayland Compositor Examples - Custom Shell.

## Member Function Documentation

### QWaylandResource::QWaylandResource(wl_resource *resource)

Constructs a QWaylandResource which contains resource.

### QWaylandResource::QWaylandResource()

Constructs an invalid QWaylandResource. The resource() accessor will return null.

### wl_resource *QWaylandResource::resource() const

Returns the wl_resource pointer held by this QWaylandResource.