Repository navigation
CURA-13376 Make sure all the dialogs are handled the proper way - #1066
Conversation
CURA-13376 We now set the transient parent on the top-level Dialog item, so that it does not require being created through createQmlSubWindow anymore. This is useful for dialogs that are created from QML.
There was a problem hiding this comment.
🟡 Changes recommended
The constant main-window property prevents surviving dialogs from updating their transient parent after a QML reload.
1 open issue
What changed in this PR
Standardizes dialog parenting in Uranium to support consistent modality and Linux centering, complementing the dialog lifecycle updates in Cura PR #21876.
Changes:
- Exposes
QtApplicationand its main window to QML. - Moves default transient parenting from
createQmlSubWindow()intoUM.Dialog.
| File | Description |
|---|---|
| UM/Qt/QtApplication.py | Exposes the application and main-window property; removes explicit subwindow parenting. |
| UM/Qt/qml/UM/Dialog.qml | Binds the default transient parent to the application's main window. |
Review effort: Balanced
R. Burema (rburema)
left a comment
There was a problem hiding this comment.
LGTM; I have a suggestion though (except I didn't test that).
|
Also; I think exposing |
CURA-13376 When using `data`, we can also set non-visual children elements, so now we don't have to declare a top-level Item for the dialogs that have various children. As suggested by @rburema
There was a case exactly like that indeed, where we could definitely have done that... So to keep in mind indeed, however at some point Uranium will merge into Cura, and that will be obsolete... |
Pin development dependencies pytest to 9.1.1 and pytest-benchmark to 5.3.0.

We recently introduced new mechanisms to make sure all the dialogs in the front-end are created, displayed and destroyed the same way. This PR ensures all the remaining dialogs are now processed properly. This also ensures that the dialog-centering hack on Linux works for all of them.
QtApplicationsingleton accessible to QMLmainWindowproperty to theQtApplicationUM.Dialogtake the main window as transient parent by default, so that modality and centering always workComes with Ultimaker/Cura#21876
CURA-13376