diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-05-06 02:48:23 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-05-06 02:48:23 (GMT) |
commit | ac7e5eb6c5fff0ea87f1af0681ab1881b8bf8eb2 (patch) | |
tree | 1a093b51ce365969df7db277dd78a3edd28ede06 /doc/src/snippets/declarative/listview | |
parent | 5edf4ed878bbe933e6ff0023cce8808b1dcff6c0 (diff) | |
download | Qt-ac7e5eb6c5fff0ea87f1af0681ab1881b8bf8eb2.zip Qt-ac7e5eb6c5fff0ea87f1af0681ab1881b8bf8eb2.tar.gz Qt-ac7e5eb6c5fff0ea87f1af0681ab1881b8bf8eb2.tar.bz2 |
Documentation.
Diffstat (limited to 'doc/src/snippets/declarative/listview')
-rw-r--r-- | doc/src/snippets/declarative/listview/highlight.qml | 28 | ||||
-rw-r--r-- | doc/src/snippets/declarative/listview/listview.qml | 19 |
2 files changed, 15 insertions, 32 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 diff --git a/doc/src/snippets/declarative/listview/listview.qml b/doc/src/snippets/declarative/listview/listview.qml index 3596af1..21a5fce 100644 --- a/doc/src/snippets/declarative/listview/listview.qml +++ b/doc/src/snippets/declarative/listview/listview.qml @@ -1,8 +1,7 @@ //! [3] 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. @@ -14,16 +13,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 } } } } @@ -42,8 +36,7 @@ Rect { // The actual list //! [2] ListView { - width: 480 - height: parent.height + width: parent.width; height: parent.height model: ContactModel delegate: Delegate highlight: Highlight |