summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/declarative/repeater.qml
blob: a58972fcce357d614dedec85e0cc9d66432cc9d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import Qt 4.6

//! [0]
Rect { width: 220; height: 20; color: "white"
    Component { id: Dot
        Rect { width: 20; height: 20; radius: 10; color: "green" }
    }
    HorizontalLayout {
        Rect { width: 10; height: 20; color: "red" }
        Repeater { component: Dot; dataSource: 10 }
        Rect { width: 10; height: 20; color: "blue" }
    }
}
//! [0]