Dynamically create qml objects
Hi, is it possible, for example, to create dynamically some rectangles?
Something like this:
- function drawButtons (buttons) {
- for(var i=0; i<buttons; i++){
- //=====================
- Rectangle{
- id: eval('item' + i)
- y: y_pos * i
- width: width
- height: height
- color: "red"
- }
- //=====================
- }
- }
2 replies
Dynamic Object Management in QML [doc.qt.nokia.com].
Exactly what I was looking for. Missed while searching.
Dynamic Object Management in QML [doc.qt.nokia.com].
You must log in to post a reply. Not a member yet? Register here!


