QWaylandObject Class | Qt Wayland Compositor | Qt 6.11.2
Description: QWaylandObject is the base class for objects that can contain Wayland extensions.

- Qt 6.11
- Qt Wayland Compositor
- C++ Classes
- QWaylandObject
- Qt Wayland Compositor | Commercial or GPLv3

# QWaylandObject Class

QWaylandObject is the base class for objects that can contain Wayland extensions. More...

Header: | `#include <QWaylandObject>`
CMake: | `find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor)` `target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor)`
qmake: | `QT += waylandcompositor`
Inherits: | QObject
Inherited By: | QWaylandCompositor, QWaylandCompositorExtension, QWaylandKeyboard, QWaylandOutput, QWaylandPointer, QWaylandSeat, QWaylandSurface, and QWaylandTouch

- List of all members, including inherited members

## Public Functions

void | addExtension(QWaylandCompositorExtension *extension)
QWaylandCompositorExtension * | extension(const QByteArray &name)
QWaylandCompositorExtension * | extension(const wl_interface *interface)
QList<QWaylandCompositorExtension *> | extensions() const
void | removeExtension(QWaylandCompositorExtension *extension)

## Protected Functions

| QWaylandObject(QObject *parent = nullptr)

## Detailed Description

The QWaylandObject encapsulate extension container functionality. Any QWaylandObject object will automatically be an extension container and QWaylandCompositorExtension object which is a child of this will automatically add itself to its extension list, and remove itself when the extension object is destroyed.

## Member Function Documentation

### `[protected]` QWaylandObject::QWaylandObject(QObject *parent = nullptr)

Creates a QWaylandObject as a child of parent.

### void QWaylandObject::addExtension(QWaylandCompositorExtension *extension)

Registers extension with this QWaylandObject.

### QWaylandCompositorExtension *QWaylandObject::extension(const QByteArray &name)

Returns the compositor extension which matches name if one has been registered with the QWaylandObject. If no extension matching the name has been registered, this function returns null.

### QWaylandCompositorExtension *QWaylandObject::extension(const wl_interface *interface)

Returns the compositor extension which matches interface if one has been registered with the QWaylandObject. If no extension matching the interface has been registered, this function returns null.

### QList<QWaylandCompositorExtension *> QWaylandObject::extensions() const

Returns the list of compositor extensions that have been registered with this QWaylandObject.

### void QWaylandObject::removeExtension(QWaylandCompositorExtension *extension)

Removes extension from the list of registered extensions in this QWaylandObject, if it has previously been registered using addExtension().