Quickshell


PopupAnchor: QtObject

uncreatable
import Quickshell
Anchorpoint or positioner for popup windows.
  • adjustment PopupAdjustment

    The strategy used to adjust the popup’s position if it would otherwise not fit on screen, based on the anchor Go to rect, preferred Go to edges, and Go to 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.

  • Property x:int Property width:int Property y:int Property height:int Property h:int Property w:int

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

    If you leave Go to edges, Go to gravity and Go to adjustment at their default values, setting more than x and y does not matter. The anchor rect cannot be smaller than 1x1 pixels.

    NOTE

    To position a popup relative to an item inside a window, you can use coordinate mapping functions (note the warning below).

    WARNING

    Using coordinate mapping functions in a binding to this property will position the anchor incorrectly. If you want to use them, do so in Go to anchoring(), or use TransformWatcher if you need real-time updates to mapped coordinates.

  • window QtObject

    The window to anchor / attach the popup to.