From a129444bb0156c936900dbd2f12bd9f427ff366c Mon Sep 17 00:00:00 2001 From: Qt by Nokia Date: Wed, 27 Apr 2011 14:13:26 +0200 Subject: Initial import from qtquick2. Branched from the monolithic repo, Qt qtquick2 branch, at commit a4a585d2ee907746682846ae6e8a48e19deef469 --- .../auto/declarative/qsggridview/data/setindex.qml | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tests/auto/declarative/qsggridview/data/setindex.qml (limited to 'tests/auto/declarative/qsggridview/data/setindex.qml') diff --git a/tests/auto/declarative/qsggridview/data/setindex.qml b/tests/auto/declarative/qsggridview/data/setindex.qml new file mode 100644 index 0000000000..ef80f3a2fb --- /dev/null +++ b/tests/auto/declarative/qsggridview/data/setindex.qml @@ -0,0 +1,29 @@ +import QtQuick 2.0 + +Rectangle { + width: 200 + height: 200 + Component { + id: appDelegate + + Item { + id : wrapper + function startupFunction() { + if (index == 5) view.currentIndex = index; + } + Component.onCompleted: startupFunction(); + width: 30; height: 30 + Text { text: index } + } + } + + GridView { + id: view + objectName: "grid" + anchors.fill: parent + cellWidth: 30; cellHeight: 30 + model: 35 + delegate: appDelegate + focus: true + } +} -- cgit v1.2.3