Skip to content

PopupWindow

export component Example inherits Window {
width: 100px;
height: 100px;
popup := PopupWindow {
Rectangle { background: yellow; }
x: 20px; y: 20px; height: 50px; width: 50px;
}
TouchArea {
clicked => { popup.show(); }
}
}
slint

Use this element to show a popup window like a tooltip or a popup menu.

enum PopupClosePolicydefault: close-on-click

Use this property to choose when the PopupWindow closes automatically. By default, any click closes it. With no-auto-close, close it by calling close().

PopupClosePolicy

  • close-on-click: Closes the PopupWindow when user clicks or presses the escape key.
  • close-on-click-outside: Closes the PopupWindow when user clicks outside of the popup or presses the escape key.
  • no-auto-close: Does not close the PopupWindow automatically when user clicks.

bool(out)

Use this read-only property to style the element that opened the popup, for example to rotate a ComboBox’s arrow while the dropdown is open. true while the popup is shown on the screen, and false once it is closed, for example when dismissed by a click, by a selection, or by a programmatic close().

The popup only exists while it’s open, so a changed is-open handler inside it never runs. To react when the popup opens or closes, bind is-open to a property outside the popup, and handle changes of that property:

export component Example inherits Window {
property <bool> popup-open: popup.is-open;
changed popup-open => {
debug("popup open:", self.popup-open);
}
popup := PopupWindow {
Rectangle { background: yellow; }
}
TouchArea {
clicked => { popup.show(); }
}
}
slint

Show the popup on the screen.

Closes the popup. Use this if you set the close-policy property to no-auto-close.


© 2026 SixtyFPS GmbH