diff options
author | Peter Yard <peter.yard@nokia.com> | 2010-04-27 00:39:42 (GMT) |
---|---|---|
committer | Peter Yard <peter.yard@nokia.com> | 2010-04-27 00:39:42 (GMT) |
commit | 88b2bf18c558d0e2f8a9268802f277212f17e61e (patch) | |
tree | d41ca52003037fba9b45605aa6d2ed86f73b940a /tests/auto/declarative/qdeclarativefocusscope/data | |
parent | 4f3a7b5992b5aed67cced46d5d8c8c2f052dfb66 (diff) | |
parent | 09293f1d07b019dc7bfe95afb93364cc87774e82 (diff) | |
download | Qt-88b2bf18c558d0e2f8a9268802f277212f17e61e.zip Qt-88b2bf18c558d0e2f8a9268802f277212f17e61e.tar.gz Qt-88b2bf18c558d0e2f8a9268802f277212f17e61e.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'tests/auto/declarative/qdeclarativefocusscope/data')
6 files changed, 89 insertions, 8 deletions
diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/forcefocus.qml b/tests/auto/declarative/qdeclarativefocusscope/data/forcefocus.qml new file mode 100644 index 0000000..5904fd6 --- /dev/null +++ b/tests/auto/declarative/qdeclarativefocusscope/data/forcefocus.qml @@ -0,0 +1,81 @@ +import Qt 4.7 + +Rectangle { + width: 800; height: 600 + + FocusScope { + focus: true + + FocusScope { + id: firstScope + focus: true + + Rectangle { + objectName: "item0" + height: 120; width: 420 + + color: "transparent" + border.width: 5; border.color: firstScope.wantsFocus?"blue":"black" + + Rectangle { + id: item1; objectName: "item1" + x: 10; y: 10; width: 100; height: 100; color: "green" + border.width: 5; border.color: wantsFocus?"blue":"black" + focus: true + + Rectangle { + width: 50; height: 50; anchors.centerIn: parent + color: parent.focus?"red":"transparent" + } + } + + Rectangle { + id: item2; objectName: "item2" + x: 310; y: 10; width: 100; height: 100; color: "green" + border.width: 5; border.color: wantsFocus?"blue":"black" + + Rectangle { + width: 50; height: 50; anchors.centerIn: parent + color: parent.focus?"red":"transparent" + } + } + } + } + + FocusScope { + id: secondScope + + Rectangle { + objectName: "item3" + y: 160; height: 120; width: 420 + + color: "transparent" + border.width: 5; border.color: secondScope.wantsFocus?"blue":"black" + + Rectangle { + id: item4; objectName: "item4" + x: 10; y: 10; width: 100; height: 100; color: "green" + border.width: 5; border.color: wantsFocus?"blue":"black" + + Rectangle { + width: 50; height: 50; anchors.centerIn: parent + color: parent.focus?"red":"transparent" + } + } + + Rectangle { + id: item5; objectName: "item5" + x: 310; y: 10; width: 100; height: 100; color: "green" + border.width: 5; border.color: wantsFocus?"blue":"black" + + Rectangle { + width: 50; height: 50; anchors.centerIn: parent + color: parent.focus?"red":"transparent" + } + } + } + } + } + Keys.onDigit4Pressed: item4.focus = true + Keys.onDigit5Pressed: item5.forceFocus() +} diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/test.qml b/tests/auto/declarative/qdeclarativefocusscope/data/test.qml index 647e5bf..6b09c29 100644 --- a/tests/auto/declarative/qdeclarativefocusscope/data/test.qml +++ b/tests/auto/declarative/qdeclarativefocusscope/data/test.qml @@ -1,4 +1,4 @@ -import Qt 4.6 +import Qt 4.7 Rectangle { color: "white" @@ -20,7 +20,7 @@ Rectangle { color: "transparent" border.width: 5 - //border.color: myScope.wantsFocus?"blue":"black" + border.color: myScope.wantsFocus?"blue":"black" Rectangle { id: item1; objectName: "item1" diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/test2.qml b/tests/auto/declarative/qdeclarativefocusscope/data/test2.qml index 277fda4..216277e 100644 --- a/tests/auto/declarative/qdeclarativefocusscope/data/test2.qml +++ b/tests/auto/declarative/qdeclarativefocusscope/data/test2.qml @@ -1,4 +1,4 @@ -import Qt 4.6 +import Qt 4.7 Rectangle { color: "white" diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/test3.qml b/tests/auto/declarative/qdeclarativefocusscope/data/test3.qml index 9344d07..2ac0d18 100644 --- a/tests/auto/declarative/qdeclarativefocusscope/data/test3.qml +++ b/tests/auto/declarative/qdeclarativefocusscope/data/test3.qml @@ -1,4 +1,4 @@ -import Qt 4.6 +import Qt 4.7 Rectangle { color: "white" diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/test4.qml b/tests/auto/declarative/qdeclarativefocusscope/data/test4.qml index d8bd390..8862b39 100644 --- a/tests/auto/declarative/qdeclarativefocusscope/data/test4.qml +++ b/tests/auto/declarative/qdeclarativefocusscope/data/test4.qml @@ -1,4 +1,4 @@ -import Qt 4.6 +import Qt 4.7 Rectangle { color: "white" @@ -19,7 +19,7 @@ Rectangle { color: "transparent" border.width: 5 - //border.color: myScope.wantsFocus?"blue":"black" + border.color: myScope.wantsFocus?"blue":"black" Rectangle { id: item1; objectName: "item1" diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/test5.qml b/tests/auto/declarative/qdeclarativefocusscope/data/test5.qml index da452cf..d67ec57 100644 --- a/tests/auto/declarative/qdeclarativefocusscope/data/test5.qml +++ b/tests/auto/declarative/qdeclarativefocusscope/data/test5.qml @@ -1,4 +1,4 @@ -import Qt 4.6 +import Qt 4.7 Rectangle { color: "white" @@ -20,7 +20,7 @@ Rectangle { color: "transparent" border.width: 5 - //border.color: myScope.wantsFocus?"blue":"black" + border.color: myScope.wantsFocus?"blue":"black" Rectangle { x: 10; y: 10 |