aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickitem2/data
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@digia.com>2013-04-09 12:09:24 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-09 19:41:03 +0200
commit8190355557c13bba836cef49585556f0c823f672 (patch)
treef60b371c85ab246db3124e10c14385738c3ea7ab /tests/auto/quick/qquickitem2/data
parent47ca880f33a517201cf123470c9137202c625564 (diff)
Added more tests for activeFocusOnTab
The ignored key events will go to parent. Change-Id: I5e002ee9df44d1c7865c1c50a1631e8e206c68af Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Diffstat (limited to 'tests/auto/quick/qquickitem2/data')
-rw-r--r--tests/auto/quick/qquickitem2/data/activeFocusOnTab4.qml56
1 files changed, 56 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickitem2/data/activeFocusOnTab4.qml b/tests/auto/quick/qquickitem2/data/activeFocusOnTab4.qml
new file mode 100644
index 0000000000..0c8586294d
--- /dev/null
+++ b/tests/auto/quick/qquickitem2/data/activeFocusOnTab4.qml
@@ -0,0 +1,56 @@
+import QtQuick 2.1
+
+Item {
+ id: main
+ objectName: "main"
+ width: 800
+ height: 600
+ focus: true
+ Component.onCompleted: button11.focus = true
+ Item {
+ id: sub1
+ objectName: "sub1"
+ width: 230
+ height: 600
+ activeFocusOnTab: false
+ anchors.top: parent.top
+ anchors.left: parent.left
+ Item {
+ id: button11
+ objectName: "button11"
+ width: 100
+ height: 50
+ activeFocusOnTab: false
+ Rectangle {
+ anchors.fill: parent
+ color: parent.activeFocus ? "red" : "black"
+ }
+
+ anchors.top: parent.top
+ anchors.topMargin: 100
+ }
+ }
+ Item {
+ id: sub2
+ objectName: "sub2"
+ activeFocusOnTab: false
+ width: 230
+ height: 600
+ anchors.top: parent.top
+ anchors.left: sub1.right
+ Item {
+ id: button21
+ objectName: "button21"
+ width: 100
+ height: 50
+ activeFocusOnTab: true
+ Rectangle {
+ anchors.fill: parent
+ color: parent.activeFocus ? "red" : "black"
+ }
+
+ anchors.top: parent.top
+ anchors.topMargin: 100
+ }
+ }
+}