From 58ae16f9d40b1edbd2369b3571a40d825819c758 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Fri, 23 Apr 2021 09:02:56 +0200 Subject: Doc: clarify sizing behavior of Page Items declared as children must be positioned and sized manually. Pick-to: 6.1 Change-Id: Ie2b2989de07729464ae38b634992d53063ff739d Reviewed-by: Fabian Kosmale --- src/quicktemplates2/qquickpage.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/quicktemplates2/qquickpage.cpp b/src/quicktemplates2/qquickpage.cpp index 0a72bad7..03955ca6 100644 --- a/src/quicktemplates2/qquickpage.cpp +++ b/src/quicktemplates2/qquickpage.cpp @@ -57,11 +57,19 @@ QT_BEGIN_NAMESPACE \image qtquickcontrols2-page-wireframe.png + Items declared as children of a Page are: + \list + \li automatically parented to the Page's contentItem. Items created + dynamically need to be explicitly parented to the contentItem. + \li not automatically positioned or resized. + \endlist + The following example snippet illustrates how to use a page-specific toolbar header and an application-wide tabbar footer. \qml - import QtQuick.Controls 2.12 + import QtQuick.Controls + import QtQuick.Layouts ApplicationWindow { visible: true @@ -73,6 +81,11 @@ QT_BEGIN_NAMESPACE header: ToolBar { // ... } + + ColumnLayout { + anchors.fill: parent + // ... + } } } -- cgit v1.2.3