~vtuson/scopecreator/twitter-template

« back to all changes in this revision

Viewing changes to src/go/src/gopkg.in/qml.v0/examples/modelview/delegate/delegate.qml

  • Committer: Victor Palau
  • Date: 2015-03-11 14:24:42 UTC
  • Revision ID: vtuson@gmail.com-20150311142442-f2pxp111c8ynv232
public release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import QtQuick 2.0
 
2
 
 
3
Item {
 
4
    width: 320; height: 200
 
5
 
 
6
    ListView {
 
7
        width: 120;
 
8
        model: colors.len
 
9
        delegate: Text {
 
10
            text: "I am color number: " + index
 
11
            color: colors.color(index)
 
12
        }
 
13
        anchors.top: parent.top
 
14
        anchors.bottom: parent.bottom
 
15
        anchors.horizontalCenter: parent.horizontalCenter
 
16
    }
 
17
}