diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2020-06-29 12:46:54 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2020-06-29 14:21:39 +0200 |
commit | 53730c5da89dbfa085778749a3ebd438970ab2c2 (patch) | |
tree | 151d8c6a6b1e5807069ec161533fc154fbea1d3f /src/quick/doc | |
parent | d422e0fff12792b7be130ea4ed7d921d937aed0a (diff) |
Doc: fix delegate snippet
Pick-to: 5.15
Change-Id: I50facb06e37c26bf86d032d3fd5377f23a5d2bc2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/quick/doc')
-rw-r--r-- | src/quick/doc/snippets/qml/listview.qml | 8 |
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] |