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

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