summaryrefslogtreecommitdiff
path: root/tests/auto/controls/data/tst_tableview.qml
diff options
context:
space:
mode:
authorCaroline Chao <caroline.chao@digia.com>2013-04-25 12:44:57 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-25 16:24:20 +0200
commitf4ec7049debb8e455056c8afcb9e24e952cd05e7 (patch)
treed4d7769702f8522673bca87be76d7883478db500 /tests/auto/controls/data/tst_tableview.qml
parent587ebb4bd21e99c568b792c0d76a32b090acb375 (diff)
downloadqtquickcontrols-f4ec7049debb8e455056c8afcb9e24e952cd05e7.tar.gz
TableView: Fix mouse click not forwarded to child
Add autotest. Change-Id: Iff3e5c1caab506b90bb1a9cd14a418c48280ffe3 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'tests/auto/controls/data/tst_tableview.qml')
-rw-r--r--tests/auto/controls/data/tst_tableview.qml18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_tableview.qml b/tests/auto/controls/data/tst_tableview.qml
index cd83ef3d..4bdf15db 100644
--- a/tests/auto/controls/data/tst_tableview.qml
+++ b/tests/auto/controls/data/tst_tableview.qml
@@ -43,6 +43,11 @@ import QtTest 1.0
import QtQuick.Controls 1.0
import QtQuickControlsTests 1.0
+Item {
+ id: container
+ width: 400
+ height: 400
+
TestCase {
id: testCase
name: "Tests_TableView"
@@ -140,6 +145,18 @@ TestCase {
table.destroy();
}
+ function test_forwardClickToChild() {
+ var component = Qt.createComponent("tableview/table_delegate.qml")
+ compare(component.status, Component.Ready)
+ var table = component.createObject(container);
+ verify(table !== null, "table created is null")
+ table.forceActiveFocus();
+ compare(table.test, 0)
+ mouseClick(table, 15 , 55, Qt.LeftButton)
+ compare(table.test, 1)
+ table.destroy()
+ }
+
// In TableView, drawn text = table.currentRowItem.children[1].children[1].itemAt(0).children[0].children[0].text
function findAChild(item, name)
@@ -171,3 +188,4 @@ TestCase {
return undefined // no matching child found
}
}
+}