aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2016-09-21 14:09:13 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-09-21 21:40:22 +0000
commit9dea203013c0a5d20fdffbb2b9a1c1dcc70435b1 (patch)
treeb0800e46bc3e4f3d0c4eaf5e61c58dc484dca3a6 /src
parent54d276edc92d87a88136b2c31396e8ef45a71290 (diff)
Page: fix documentation review findings
Change-Id: Ia63c5d34ccb239fb45c7445a4354e6594bfce812 Task-number: QTBUG-55904 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/quicktemplates2/qquickpage.cpp47
1 files changed, 45 insertions, 2 deletions
diff --git a/src/quicktemplates2/qquickpage.cpp b/src/quicktemplates2/qquickpage.cpp
index 5c2c5b42..9ee0970b 100644
--- a/src/quicktemplates2/qquickpage.cpp
+++ b/src/quicktemplates2/qquickpage.cpp
@@ -166,6 +166,37 @@ QQuickPage::QQuickPage(QQuickItem *parent) :
\qmlproperty string QtQuick.Controls::Page::title
This property holds the page title.
+
+ The title is often displayed at the top of a page to give
+ the user context about the page they are viewing.
+
+ \code
+ ApplicationWindow {
+ visible: true
+ width: 400
+ height: 400
+
+ header: Label {
+ text: view.currentItem.title
+ horizontalAlignment: Text.AlignHCenter
+ }
+
+ SwipeView {
+ id: view
+ anchors.fill: parent
+
+ Page {
+ title: qsTr("Home")
+ }
+ Page {
+ title: qsTr("Discover")
+ }
+ Page {
+ title: qsTr("Activity")
+ }
+ }
+ }
+ \endcode
*/
QString QQuickPage::title() const
@@ -281,7 +312,13 @@ void QQuickPage::setFooter(QQuickItem *footer)
This property holds the list of content data.
- \sa Item::data
+ The list contains all objects that have been declared in QML as children
+ of the container.
+
+ \note Unlike \c contentChildren, \c contentData does include non-visual QML
+ objects.
+
+ \sa Item::data, contentChildren
*/
QQmlListProperty<QObject> QQuickPage::contentData()
{
@@ -298,7 +335,13 @@ QQmlListProperty<QObject> QQuickPage::contentData()
This property holds the list of content children.
- \sa Item::children
+ The list contains all items that have been declared in QML as children
+ of the page.
+
+ \note Unlike \c contentData, \c contentChildren does not include non-visual
+ QML objects.
+
+ \sa Item::children, contentData
*/
QQmlListProperty<QQuickItem> QQuickPage::contentChildren()
{