diff options
author | J-P Nurmi <jpnurmi@digia.com> | 2014-09-09 16:16:00 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@digia.com> | 2014-09-10 15:25:33 +0200 |
commit | 6a7a824b970d12471f9219c84a57eb91231c59fe (patch) | |
tree | b5fdd73f1799c3238b70a0a899c84a37f913b144 /tests | |
parent | ae4a0a89b2cbab7a16d9a6d554b3f2f5c4a63426 (diff) | |
download | qtquickcontrols-6a7a824b970d12471f9219c84a57eb91231c59fe.tar.gz |
TableView: fix tab navigation
Task-number: QTBUG-41202
Change-Id: I13c420dd1443c152053ac331da7bfe5a9fbc9603
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/controls/data/tst_tableview.qml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_tableview.qml b/tests/auto/controls/data/tst_tableview.qml index b63b5b5f..8e11d9e4 100644 --- a/tests/auto/controls/data/tst_tableview.qml +++ b/tests/auto/controls/data/tst_tableview.qml @@ -875,6 +875,13 @@ TestCase { return undefined // no matching child found } + Component { + id: textFieldDelegate + TextField { + objectName: "delegate-" + styleData.row + "-" + styleData.column + } + } + function test_activeFocusOnTab() { if (!SystemInfo.tabAllWidgets) skip("This function doesn't support NOT iterating all.") @@ -926,6 +933,23 @@ TestCase { verify(control.control1.activeFocus) verify(!control.control2.activeFocus) verify(!control.control3.activeFocus) + + control.control2.itemDelegate = textFieldDelegate + + keyPress(Qt.Key_Tab) + verify(!control.control1.activeFocus) + verify(control.control2.activeFocus) + verify(!control.control3.activeFocus) + + for (var row = 0; row < 3; ++row) { + for (var col = 0; col < 2; ++col) { + keyPress(Qt.Key_Tab) + var delegate = findAChild(control.control2.__currentRowItem, "delegate-" + row + "-" + col) + verify(delegate) + verify(delegate.activeFocus) + } + } + control.destroy() } } |