XdgPopup QML Type | Qt Wayland Compositor | Qt 6.10.3
Description: XdgPopup represents the popup specific parts of and xdg surface.

- Qt 6.10
- Qt Wayland Compositor
- QML Types
- QtWayland.Compositor.XdgShell
- XdgPopup
- Qt Wayland Compositor | Commercial or GPLv3

# XdgPopup QML Type

XdgPopup represents the popup specific parts of and xdg surface. More...

Import Statement: | `import QtWayland.Compositor.XdgShell`
In C++: | QWaylandXdgPopup

- List of all members, including inherited members

## Properties

- anchorEdges : enumeration
- anchorRect : rect
- configuredGeometry : rect
- flipConstraints : enumeration
- gravityEdges : rect
- offset : point
- parentXdgSurface : XdgSurface
- positionerSize : size
- resizeConstraints : enumeration
- slideConstraints : enumeration
- unconstrainedPosition : point
- xdgSurface : XdgSurface

## Methods

- int sendConfigure(rect geometry)
- void sendPopupDone()

## Detailed Description

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

It corresponds to the Wayland interface `xdg_popup`.

## Property Documentation

anchorEdges : enumeration `[read-only]`

This property holds 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.

The possible values are:

Constant | Description
--- | ---
`Qt.TopEdge` | The top edge of the rectangle.
`Qt.LeftEdge` | The left edge of the rectangle.
`Qt.RightEdge` | The right edge of the rectangle.
`Qt.BottomEdge` | The bottom edge of the rectangle.

anchorRect : rect `[read-only]`

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

configuredGeometry : rect `[read-only]`

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

flipConstraints : enumeration `[read-only]`

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

Possible values:

Constant | Description
--- | ---
`Qt.Horizontal` | Horizontal
`Qt.Vertical` | Vertical

gravityEdges : rect `[read-only]`

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

The possible values are:

Constant | Description
--- | ---
`Qt.TopEdge` | The surface should slide towards the top of the screen.
`Qt.LeftEdge` | The surface should slide towards the left of the screen.
`Qt.RightEdge` | The surface should slide towards the right of the screen.
`Qt.BottomEdge` | The surface should slide towards the bottom of the screen.

offset : point `[read-only]`

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

parentXdgSurface : XdgSurface `[read-only]`

This property holds the XdgSurface associated with the parent of this XdgPopup.

positionerSize : size `[read-only]`

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

resizeConstraints : enumeration `[read-only]`

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

Possible values:

Constant | Description
--- | ---
`Qt.Horizontal` | Horizontal
`Qt.Vertical` | Vertical

slideConstraints : enumeration `[read-only]`

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

Possible values:

Constant | Description
--- | ---
`Qt.Horizontal` | Horizontal
`Qt.Vertical` | Vertical

unconstrainedPosition : point `[read-only]`

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.

xdgSurface : XdgSurface `[read-only]`

This property holds the XdgSurface associated with this XdgPopup.

## Method Documentation

int sendConfigure(rect 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 XdgSurface as well.

void sendPopupDone()

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