diff options
author | David Boddie <dboddie@trolltech.com> | 2010-06-16 10:44:02 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2010-06-16 10:44:02 (GMT) |
commit | 9e7f0b9e45cef278c8874539257b4038a0aa6615 (patch) | |
tree | 6f66ec8ea599e348ea550da76612cb3873478a21 /doc/src/snippets/declarative/repeater.qml | |
parent | 700a4826cf6bd755df000cb16c259343efb695cd (diff) | |
parent | 5b5785bc564ccea9f6868d02be3d1080cb5039b9 (diff) | |
download | Qt-9e7f0b9e45cef278c8874539257b4038a0aa6615.zip Qt-9e7f0b9e45cef278c8874539257b4038a0aa6615.tar.gz Qt-9e7f0b9e45cef278c8874539257b4038a0aa6615.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'doc/src/snippets/declarative/repeater.qml')
-rw-r--r-- | doc/src/snippets/declarative/repeater.qml | 53 |
1 files changed, 43 insertions, 10 deletions
diff --git a/doc/src/snippets/declarative/repeater.qml b/doc/src/snippets/declarative/repeater.qml index 825cd22..d71fd29 100644 --- a/doc/src/snippets/declarative/repeater.qml +++ b/doc/src/snippets/declarative/repeater.qml @@ -38,19 +38,52 @@ ** ****************************************************************************/ +//! [import] import Qt 4.7 +//! [import] -Rectangle { - width: 220; height: 20; color: "white" +Row { -//! [0] - Row { - Rectangle { width: 10; height: 20; color: "red" } - Repeater { - model: 10 - Rectangle { width: 20; height: 20; radius: 10; color: "green" } +//! [simple] +Row { + Repeater { + model: 3 + Rectangle { + width: 100; height: 40 + border.width: 1 + color: "yellow" } - Rectangle { width: 10; height: 20; color: "blue" } } -//! [0] +} +//! [simple] + +//! [index] +Column { + Repeater { + model: 10 + Text { text: "I'm item " + index } + } +} +//! [index] + +//! [modeldata] +Column { + Repeater { + model: ["apples", "oranges", "pears"] + Text { text: "Data: " + modelData } + } +} +//! [modeldata] + +//! [layout] +Row { + Rectangle { width: 10; height: 20; color: "red" } + Repeater { + model: 10 + Rectangle { width: 20; height: 20; radius: 10; color: "green" } + } + Rectangle { width: 10; height: 20; color: "blue" } +} +//! [layout] + } |