examples/declarative/modelviews/objectlistmodel/view.qml
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
    38 **
    38 **
    39 ****************************************************************************/
    39 ****************************************************************************/
    40 
    40 
    41 import Qt 4.7
    41 import Qt 4.7
    42 
    42 
       
    43 //![0]
    43 ListView {
    44 ListView {
    44     width: 100
    45     width: 100; height: 100
    45     height: 100
       
    46     anchors.fill: parent
    46     anchors.fill: parent
       
    47 
    47     model: myModel
    48     model: myModel
    48     delegate: Component {
    49     delegate: Rectangle {
    49         Rectangle {
    50         height: 25
    50             height: 25
    51         width: 100
    51             width: 100
    52         color: model.modelData.color
    52             color: model.modelData.color
    53         Text { text: name }
    53             Text { text: name }
       
    54         }
       
    55     }
    54     }
    56 }
    55 }
       
    56 //![0]