-->
import Quickshell
Popup window that can display in a position relative to a floating or panel window.
The following snippet creates a panel with a popup centered over it.
PanelWindow {
id: toplevel
anchors {
bottom: true
left: true
right: true
}
PopupWindow {
anchor.window: toplevel
anchor.rect.x: parentWindow.width / 2 - width / 2
anchor.rect.y: parentWindow.height
width: 500
height: 500
visible: true
}
}
The popup’s anchor / positioner relative to another window. The popup will not be shown until it has a valid anchor relative to a window and visible is true.
You can set properties of the anchor like so:
PopupWindow {
anchor.window: parentwindow
// or
anchor {
window: parentwindow
}
}
[!ERROR] Deprecated in favor of
anchor.window
.
The parent window of this popup.
Changing this property reparents the popup.
[!ERROR] Deprecated in favor of
anchor.rect.x
.
The X position of the popup relative to the parent window.
[!ERROR] Deprecated in favor of
anchor.rect.y
.
The Y position of the popup relative to the parent window.
The screen that the window currently occupies.
This may be modified to move the window to the given screen.
If the window is shown or hidden. Defaults to false.
The popup will not be shown until anchor is valid, regardless of this property.