blob: 5562f6a0395ed7c55899f88d9e75ffe72c620714 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
The following example uses the attached \l {Overlay::overlay}{Overlay.overlay}
property to position a popup in the center of the window, despite the position
of the button that opens the popup:
\code
Button {
onClicked: popup.open()
Popup {
id: popup
parent: Overlay.overlay
x: Math.round((parent.width - width) / 2)
y: Math.round((parent.height - height) / 2)
width: 100
height: 100
}
}
\endcode
|