PopupAnchor: QtObject [uncreatable]

import Quickshell

Anchorpoint or positioner for popup windows.

Properties

Property Details

adjustment: PopupAdjustment

The strategy used to adjust the popup’s position if it would otherwise not fit on screen, based on the anchor rect, preferred edges, and gravity.

See the documentation for PopupAdjustment for details.

edges: Edges

The point on the anchor rectangle the popup should anchor to. Opposing edges suchs as Edges.Left | Edges.Right are not allowed.

Defaults to Edges.Top | Edges.Left.

gravity: Edges

The direction the popup should expand towards, relative to the anchorpoint. Opposing edges suchs as Edges.Left | Edges.Right are not allowed.

Defaults to Edges.Bottom | Edges.Right.

rect.h: int

rect.height: int

rect.w: int

rect.width: int

rect.x: int

rect.y: int

The anchorpoints the popup will attach to. Which anchors will be used is determined by the edges, gravity, and adjustment.

If you leave edges, gravity and adjustment at their default values, setting more than x and y does not matter.

ℹ️
The anchor rect cannot be smaller than 1x1 pixels.

window: QtObject

The window to anchor / attach the popup to.