summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativegridview/data/attachedSignals.qml
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-03-01 07:57:03 (GMT)
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-03-01 07:57:03 (GMT)
commite538957c77f71b1cc38a3c43c9f3157f65a3ff11 (patch)
tree3d013b12ba28668d127fe5532de5fc588fe63cb0 /tests/auto/declarative/qdeclarativegridview/data/attachedSignals.qml
parent67d5513b5aca096dfc33952cf81219087b0e41b0 (diff)
parent2653c4fcf42ec93db16a299c29c9fe0f98680c75 (diff)
downloadQt-e538957c77f71b1cc38a3c43c9f3157f65a3ff11.zip
Qt-e538957c77f71b1cc38a3c43c9f3157f65a3ff11.tar.gz
Qt-e538957c77f71b1cc38a3c43c9f3157f65a3ff11.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into 4.7
Conflicts: src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def
Diffstat (limited to 'tests/auto/declarative/qdeclarativegridview/data/attachedSignals.qml')
-rw-r--r--tests/auto/declarative/qdeclarativegridview/data/attachedSignals.qml27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativegridview/data/attachedSignals.qml b/tests/auto/declarative/qdeclarativegridview/data/attachedSignals.qml
new file mode 100644
index 0000000..d527e9d
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativegridview/data/attachedSignals.qml
@@ -0,0 +1,27 @@
+import QtQuick 1.0
+
+GridView {
+ id: view
+ width: 240; height: 320
+
+ property variant addedDelegates: []
+ property int removedDelegateCount
+
+ model: testModel
+
+ cellWidth: delegateWidth; cellHeight: delegateHeight
+
+ delegate: Rectangle {
+ width: delegateWidth; height: delegateHeight
+ border.width: 1
+ GridView.onAdd: {
+ var obj = GridView.view.addedDelegates
+ obj.push(model.name)
+ GridView.view.addedDelegates = obj
+ }
+ GridView.onRemove: {
+ view.removedDelegateCount += 1
+ }
+ }
+}
+