aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlitemmodels/data/modelindexlist.qml
blob: 44393392d370a037e43e67ff17e96dbd3b2203c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import Test 1.0

ItemModelsTest {
    property var modelIndexList
    property int count

    onModelChanged: {
        modelIndexList = createModelIndexList()
        modelIndexList.prepend(model.index(0, 0))
        modelIndexList.append(model.index(1, 1))
        for (var i = 0; i < 3; i++)
            modelIndexList.insert(i, model.index(2 + i, 2 + i))

        count = modelIndexList.length
        modelIndex = modelIndexList.at(0)

        modelIndexList.removeAt(3)
        modelIndexList.removeFirst()
        modelIndexList.removeLast()
    }
}