QWaylandXdgPopup Class | Qt Wayland Compositor | Qt 6.11.2
Description: The QWaylandXdgPopup class represents the popup specific parts of an xdg surface.

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

# QWaylandXdgPopup Class

The QWaylandXdgPopup class represents the popup specific parts of an xdg surface. More...

Header: | `#include <QWaylandXdgPopup>`
CMake: | `find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor)` `target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor)`
qmake: | `QT += waylandcompositor`
In QML: | XdgPopup
Inherits: | QObject

- List of all members, including inherited members

## Properties

anchorEdges : const Qt::Edges anchorRect : const QRect configuredGeometry : QRect flipConstraints : const Qt::Orientations gravityEdges : const Qt::Edges offset : const QPoint | parentXdgSurface : QWaylandXdgSurface* const positionerSize : const QSize resizeConstraints : const Qt::Orientations slideConstraints : const Qt::Orientations unconstrainedPosition : const QPoint xdgSurface : QWaylandXdgSurface* const

## Public Functions

Qt::Edges | anchorEdges() const
QRect | anchorRect() const
QRect | configuredGeometry() const
Qt::Orientations | flipConstraints() const
Qt::Edges | gravityEdges() const
QPoint | offset() const
QWaylandXdgSurface * | parentXdgSurface() const
QSize | positionerSize() const
Qt::Orientations | resizeConstraints() const
uint | sendConfigure(const QRect &geometry)
void | sendPopupDone()
Qt::Orientations | slideConstraints() const
QPoint | unconstrainedPosition() const
QWaylandXdgSurface * | xdgSurface() const

## Signals

void | configuredGeometryChanged()

## Static Public Members

QWaylandSurfaceRole * | role()

## Detailed Description

This class is part of the QWaylandXdgShell extension and provides a way to extend the functionality of a QWaylandXdgSurface with features specific to desktop-style menus for an xdg surface.

It corresponds to the Wayland interface `xdg_popup`.

## Property Documentation

### `[read-only]` anchorEdges : const Qt::Edges

Returns the set of edges on the anchor rect that the child surface should be placed relative to. If no edges are specified in a direction, the anchor point should be centered between the edges.

Access functions:

Qt::Edges | anchorEdges() const

### `[read-only]` anchorRect : const QRect

Returns the anchor rectangle relative to the parent window geometry that the child surface should be placed relative to.

Access functions:

QRect | anchorRect() const

### `[read-only]` configuredGeometry : QRect

The window geometry the popup received in the configure event. Relative to the upper left corner of the parent surface.

Access functions:

QRect | configuredGeometry() const

Notifier signal:

void | configuredGeometryChanged()

### `[read-only]` flipConstraints : const Qt::Orientations

This property holds the orientations in which the child should flip to fit within the screen.

Access functions:

Qt::Orientations | flipConstraints() const

### `[read-only]` gravityEdges : const Qt::Edges

Specifies in what direction the surface should be positioned, relative to the anchor point.

Access functions:

Qt::Edges | gravityEdges() const

### `[read-only]` offset : const QPoint

Returns the surface position relative to the position of the anchor on the anchor rectangle and the anchor on the surface.

Access functions:

QPoint | offset() const

### `[read-only]` parentXdgSurface : QWaylandXdgSurface* const

This property holds the QWaylandXdgSurface associated with the parent of this QWaylandXdgPopup.

Access functions:

QWaylandXdgSurface * | parentXdgSurface() const

### `[read-only]` positionerSize : const QSize

Returns the size requested for the window geometry by the positioner object.

Access functions:

QSize | positionerSize() const

### `[read-only]` resizeConstraints : const Qt::Orientations

This property holds the orientations in which the child should resize to fit within the screen.

Access functions:

Qt::Orientations | resizeConstraints() const

### `[read-only]` slideConstraints : const Qt::Orientations

This property holds the orientations in which the child should slide to fit within the screen.

Access functions:

Qt::Orientations | slideConstraints() const

### `[read-only]` unconstrainedPosition : const QPoint

The position of the surface relative to the parent window geometry if the surface is not constrained. I.e. when not moved to fit inside the screen or similar.

Access functions:

QPoint | unconstrainedPosition() const

### `[read-only]` xdgSurface : QWaylandXdgSurface* const

This property holds the QWaylandXdgSurface associated with this QWaylandXdgPopup.

Access functions:

QWaylandXdgSurface * | xdgSurface() const

## Member Function Documentation

### `[static]` QWaylandSurfaceRole *QWaylandXdgPopup::role()

Returns the surface role for the QWaylandPopup.

### `[invokable]` uint QWaylandXdgPopup::sendConfigure(const QRect &geometry)

Sends a configure event to the client. geometry contains the window geometry relative to the upper left corner of the window geometry of the parent surface.

This implicitly sends a configure event to the corresponding QWaylandXdgSurface as well.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

### `[invokable]` void QWaylandXdgPopup::sendPopupDone()

Dismiss the popup. According to the `xdg-shell` protocol this should make the client destroy the popup.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.