diff options
Diffstat (limited to 'src/quick/items/qquickwindow.cpp')
-rw-r--r-- | src/quick/items/qquickwindow.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index 421b0479c9..c2c95ef6fe 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -3670,17 +3670,21 @@ void QQuickWindow::endExternalCommands() shown, that minimizing the parent window will also minimize the transient window, and so on; however results vary somewhat from platform to platform. - Declaring a Window inside an Item or inside another Window, either via the + Declaring a Window inside an Item or another Window, either via the \l{Window::data}{default property} or a dedicated property, will automatically - set up a transient parent relationship to the containing Item or Window, + set up a transient parent relationship to the containing window, unless the \l transientParent property is explicitly set. This applies when creating Window items via \l [QML] {QtQml::Qt::createComponent()} {Qt.createComponent} or \l [QML] {QtQml::Qt::createQmlObject()} - {Qt.createQmlObject} as well, if an Item or Window is passed as the - \c parent argument. + {Qt.createQmlObject} as well, as long as an Item or Window is passed + as the \c parent argument. A Window with a transient parent will not be shown until its transient - parent is shown, even if the \l visible property is \c true. Setting + parent is shown, even if the \l visible property is \c true. This also + applies for the automatic transient parent relationship described above. + In particular, if the Window's containing element is an Item, the window + will not be shown until the containing item is added to a scene, via its + \l{Concepts - Visual Parent in Qt Quick}{visual parent hierarchy}. Setting the \l transientParent to \c null will override this behavior: \snippet qml/nestedWindowTransientParent.qml 0 |