Quickshell


QsMenuAnchor: QtObject

import Quickshell
Display anchor for platform menus.
  • anchor PopupAnchor
    readonly

    The menu’s anchor / positioner relative to another window. The menu will not be shown until it has a valid anchor.

    NOTE

    The following is subject to change and NOT a guarantee of future behavior.

    A snapshot of the anchor at the time Go to opened() is emitted will be used to position the menu. Additional changes to the anchor after this point will not affect the placement of the menu.

    You can set properties of the anchor like so:

    QsMenuAnchor {
      anchor.window: parentwindow
      // or
      anchor {
        window: parentwindow
      }
    }
  • visible bool
    readonly

    If the menu is currently open and visible.

    See also: open(), close().

  • close() void

    Close the open menu.

  • open() void

    Open the given menu on this menu Requires that Go to anchor is valid.

  • closed()   ?

    Sent when the menu is closed.

  • opened()   ?

    Sent when the menu is displayed onscreen which may be after Go to visible becomes true.