diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2021-04-23 09:02:56 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2021-05-05 09:59:53 +0000 |
commit | 58ae16f9d40b1edbd2369b3571a40d825819c758 (patch) | |
tree | 34a23265d844bb8fa169934f66981dc2402bebe3 /src | |
parent | b9980844a9cc865accc68365bd159283628d68a5 (diff) |
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 <fabian.kosmale@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/quicktemplates2/qquickpage.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
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 + // ... + } } } |