summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/declarative/listview/listview.qml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/snippets/declarative/listview/listview.qml')
-rw-r--r--doc/src/snippets/declarative/listview/listview.qml14
1 files changed, 10 insertions, 4 deletions
diff --git a/doc/src/snippets/declarative/listview/listview.qml b/doc/src/snippets/declarative/listview/listview.qml
index 8ba47a8..370429e 100644
--- a/doc/src/snippets/declarative/listview/listview.qml
+++ b/doc/src/snippets/declarative/listview/listview.qml
@@ -127,10 +127,16 @@ ListView {
Component {
id: contactsDelegate
- Text {
- id: contactInfo
- text: name + ": " + number
- color: contactInfo.ListView.isCurrentItem ? "red" : "black"
+ Rectangle {
+ id: wrapper
+ width: 180
+ height: contactInfo.height
+ color: ListView.isCurrentItem ? "black" : "red"
+ Text {
+ id: contactInfo
+ text: name + ": " + number
+ color: wrapper.ListView.isCurrentItem ? "red" : "black"
+ }
}
}