tests/auto/quick/qquickrepeater/data/asyncloader.qml
raw| 1 | import QtQuick 2.0 |
| 2 | |
| 3 | Item { |
| 4 | width: 360 |
| 5 | height: 480 |
| 6 | |
| 7 | Loader { |
| 8 | asynchronous: true |
| 9 | sourceComponent: viewComponent |
| 10 | } |
| 11 | |
| 12 | Component { |
| 13 | id: viewComponent |
| 14 | Column { |
| 15 | objectName: "container" |
| 16 | Repeater { |
| 17 | id: repeater |
| 18 | objectName: "repeater" |
| 19 | |
| 20 | model: 10 |
| 21 | |
| 22 | delegate: Rectangle { |
| 23 | objectName: "delegate" + index |
| 24 | color: "red" |
| 25 | width: 360 |
| 26 | height: 50 |
| 27 | Text { text: index } |
| 28 | } |
| 29 | } |
| 30 | } |
| 31 | } |
| 32 | } |