Details
-
Suggestion
-
Resolution: Done
-
P2: Important
-
None
-
None
-
1abc7fcbabcc5a89ceaaf69173d077e22ed2d658
Description
Centering popups and dialogs is very common, so we should make it more straight-forward. Dialogs could possibly even center to the window by default, unless explicitly positioned otherwise.
Some ideas we've had so far:
a) using magic enum values like Popup.CenterInParent (and Popup.CenterInWindow):
ApplicationWindow { Button { Popup { x: Popup.CenterInParent // or Popup.CenterInWindow, or parent: window.overlay y: Popup.CenterInParent // or Popup.CenterInWindow, or parent: window.overlay } } }
b) a dedicated property, similar to anchors.centerIn:
ApplicationWindow {
id: window
Button {
Popup {
centerIn: parent // or centerIn: window
}
}
}
Attachments
Issue Links
- resulted from
-
QTBUG-59380 Popup with margins opened at wrong position
-
- Closed
-
-
QTBUG-60347 Add DialogTitleBar
-
- Open
-
For Gerrit Dashboard: QTBUG-60354 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
223303,23 | Add anchors property to Popup to allow centering in parent/window | dev | qt/qtquickcontrols2 | Status: MERGED | -2 | 0 |