aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2020-06-29 12:46:54 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-06-30 20:33:16 +0000
commitf6d849c2d807f268af1c25da1b8ce385e0368418 (patch)
tree1864ec68a1feb6ff67aa0e3f3ec26fdd0b3971f2
parenta81c111dd056efbd37b6267871367f3d975a1078 (diff)
Doc: fix delegate snippet
Change-Id: I50facb06e37c26bf86d032d3fd5377f23a5d2bc2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 53730c5da89dbfa085778749a3ebd438970ab2c2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/quick/doc/snippets/qml/listview.qml8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/quick/doc/snippets/qml/listview.qml b/src/quick/doc/snippets/qml/listview.qml
index 4d53077e26..bece446ac1 100644
--- a/src/quick/doc/snippets/qml/listview.qml
+++ b/src/quick/doc/snippets/qml/listview.qml
@@ -73,10 +73,10 @@ Component {
Text {
id: label
font.pixelSize: 24
- text: if (index == 0)
- label.text = type + " (default)"
- else
- text: type
+ text: index === 0 ? type + " (default)" : type
+
+ required property int index
+ required property string type
}
}
//! [delegate]