- Qt 6.7
- Qt Wayland Compositor
- QML Types
- QtWayland.Compositor.QtShell
- QtShell
- Qt Wayland Compositor | Commercial or GPLv3

# QtShell QML Type

Provides a shell extension for Qt applications running on a Qt Wayland Compositor. More...

Import Statement: | import QtWayland.Compositor.QtShell
Since: | Qt 6.3

- List of all members, including inherited members

## Signals

- void qtShellSurfaceCreated(QtShellSurface *qtShellSurface)
- void qtShellSurfaceRequested(WaylandSurface surface, WaylandResource resource)

## Detailed Description

The QtShell extension provides a way to associate an QtShellSurface with a regular Wayland surface. The QtShell extension is written to support the window management features which are supported by Qt. It may be suitable on a platform where both the compositor and client applications are written with Qt, and where applications are trusted not to abuse features such as manual window positioning and "bring-to-front".

For other use cases, consider using IviApplication or XdgShell instead.

     import QtWayland.Compositor.QtShell

     WaylandCompositor {
         property ListModel shellSurfaces: ListModel {}
         QtShell {
             onQtShellSurfaceCreated: {
                  shellSurfaces.append({shellSurface: qtShellSurface})
             }
         }
     }

## Signal Documentation

void qtShellSurfaceCreated(QtShellSurface *qtShellSurface)

This signal is emitted when an QtShellSurface has been created. The supplied qtShellSurface is most commonly used to instantiate a ShellSurfaceItem.

Note: The corresponding handler is `onQtShellSurfaceCreated`.

void qtShellSurfaceRequested(WaylandSurface surface, WaylandResource resource)

This signal is emitted when the client has requested a QtShellSurface to be associated with surface. The handler for this signal is expected to create the QtShellSurface for resource and initialize it within the scope of the signal emission. If no QtShellSurface is created, a default one will be created instead.

Note: The corresponding handler is `onQtShellSurfaceRequested`.