Fix test fails related to QTBUG-22237
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qsggridview / data / attachedSignals.qml
1 import QtQuick 2.0
2
3 GridView {
4     id: view
5     width: 240; height: 320
6
7     property variant addedDelegates: []
8     property int removedDelegateCount
9
10     model: testModel
11
12     cellWidth: delegateWidth; cellHeight: delegateHeight
13
14     delegate: Rectangle {
15         width: delegateWidth; height: delegateHeight
16         border.width: 1
17         GridView.onAdd: {
18             var obj = GridView.view.addedDelegates
19             obj.push(model.name)
20             GridView.view.addedDelegates = obj
21         }
22         GridView.onRemove: {
23             view.removedDelegateCount += 1
24         }
25     }
26 }
27