IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QtShell QML Type

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

This type was introduced in Qt 6.3.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QtShell QML Type

  • Import Statement: import QtWayland.Compositor.QtShell

  • Since:: Qt 6.3

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.

 
Sélectionnez
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.

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.

The corresponding handler is onQtShellSurfaceRequested.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+