diff options
Diffstat (limited to 'doc/src/snippets/declarative/listview/highlight.qml')
-rw-r--r-- | doc/src/snippets/declarative/listview/highlight.qml | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/doc/src/snippets/declarative/listview/highlight.qml b/doc/src/snippets/declarative/listview/highlight.qml index d8bbb22..e3c948e 100644 --- a/doc/src/snippets/declarative/listview/highlight.qml +++ b/doc/src/snippets/declarative/listview/highlight.qml @@ -1,7 +1,6 @@ Rect { - width: 180 - height: 200 - color: "white" + width: 180; height: 200; color: "white" + // ContactModel model is defined in dummydata/ContactModel.qml // The viewer automatically loads files in dummydata/* to assist // development without a real data source. @@ -13,16 +12,11 @@ Rect { id: Delegate Item { id: Wrapper - width: 180 - height: 40 + width: 180; height: 40 VerticalLayout { x: 5; y: 5 - Text { - text: '<b>Name:</b> ' + name - } - Text { - text: '<b>Number:</b> ' + number - } + Text { text: '<b>Name:</b> ' + name } + Text { text: '<b>Number:</b> ' + number } } } } @@ -34,10 +28,8 @@ Rect { Component { id: Highlight Rect { - width: 180 - height: 40 - color: "lightsteelblue" - radius: 5 + width: 180; height: 40 + color: "lightsteelblue"; radius: 5 y: Follow { source: List.current.y spring: 3 @@ -47,10 +39,8 @@ Rect { } ListView { id: List - width: 180 - height: parent.height - model: ContactModel - delegate: Delegate + width: parent.height; height: parent.height + model: ContactModel; delegate: Delegate highlight: Highlight autoHighlight: false focus: true |