aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitch Curtis <[email protected]>2025-04-17 14:13:47 +0800
committerMitch Curtis <[email protected]>2025-04-18 13:10:54 +0800
commitf452998df7133e4342ab36521876ae34586710ca (patch)
tree97642beb0120d24d956f6e2a38e7ad8d667e1d14
parent2a741a3f0cddcc4b9e1ffa5195c7425a7d4d016d (diff)
Internally document QQuickApplicationWindow's item hierarchy
This changed after 83d90845527799c78366c2b89e9c14bc35e88695. It's not documented anywhere and is difficult to follow when going only by the code. Task-number: QTBUG-136031 Pick-to: 6.9 Change-Id: Ia9a12191bb19d8dd23d142a78dbe573a4d2e3007 Reviewed-by: Tor Arne Vestbø <[email protected]>
-rw-r--r--src/quicktemplates/qquickapplicationwindow.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/quicktemplates/qquickapplicationwindow.cpp b/src/quicktemplates/qquickapplicationwindow.cpp
index 5f17a50b3c..932957eb44 100644
--- a/src/quicktemplates/qquickapplicationwindow.cpp
+++ b/src/quicktemplates/qquickapplicationwindow.cpp
@@ -817,9 +817,21 @@ void QQuickApplicationWindow::classBegin()
QQuickWindowQmlImpl::classBegin();
d->resolveFont();
- // Create the control up front, rather than lazily, as we have
- // to set the default padding before any user-bindings override
- // them.
+ /*
+ Create the control up front, rather than lazily, as we have
+ to set the default padding before any user-bindings override
+ them.
+
+ The hierarchy is:
+
+ contentItem (QQuickRootItem)
+ ├── menuBar
+ ├── header
+ ├── control (QQuickControl)
+ │ └── control->contentItem() (QQuickContentItem)
+ ├── footer
+ └── background
+ */
d->control = new QQuickControl(QQuickWindow::contentItem());
d->control->setObjectName("ApplicationWindowContentControl");
#if QT_CONFIG(quicktemplates2_hover)