~loic.molinari/+junk/qtdeclarative-shadereffectsource-changes

« back to all changes in this revision

Viewing changes to tests/auto/quick/qquicklistview/data/qtbug-21742.qml

  • Committer: Loïc Molinari
  • Date: 2012-04-21 17:59:51 UTC
  • Revision ID: loic.molinari@canonical.com-20120421175951-bqx68caaf5zrp76l
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import QtQuick 2.0
 
2
 
 
3
Rectangle {
 
4
    height: 200
 
5
    width: 200
 
6
    property int count: menuView.count
 
7
 
 
8
    Component.onCompleted: { setModel(); }
 
9
 
 
10
    function setModel()
 
11
    {
 
12
        menuModel.append({"enabledItem" : true});
 
13
        menuView.currentIndex = 0;
 
14
    }
 
15
 
 
16
    ListModel {
 
17
        id: menuModel
 
18
    }
 
19
 
 
20
    ListView {
 
21
        id: menuView
 
22
        anchors.fill: parent
 
23
        model: menuModel
 
24
        delegate: mything
 
25
    }
 
26
 
 
27
    Component {
 
28
        id: mything
 
29
        Rectangle {
 
30
            height: 50
 
31
            width: 200
 
32
            color: index == menuView.currentIndex ? "green" : "blue"
 
33
        }
 
34
    }
 
35
 
 
36
}
 
 
b'\\ No newline at end of file'