summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativefocusscope/data/signalEmission.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qdeclarativefocusscope/data/signalEmission.qml')
-rw-r--r--tests/auto/declarative/qdeclarativefocusscope/data/signalEmission.qml33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativefocusscope/data/signalEmission.qml b/tests/auto/declarative/qdeclarativefocusscope/data/signalEmission.qml
new file mode 100644
index 0000000..07601c7
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativefocusscope/data/signalEmission.qml
@@ -0,0 +1,33 @@
+import Qt 4.7
+
+Rectangle {
+ width: 200
+ height: 200
+
+ FocusScope {
+ focus: true
+ Rectangle {
+ objectName: "item1"
+ color: "blue"
+ onFocusChanged: focus ? color = "red" : color = "blue"
+ }
+ Rectangle {
+ objectName: "item2"
+ color: "blue"
+ onFocusChanged: focus ? color = "red" : color = "blue"
+ }
+ }
+
+ FocusScope {
+ Rectangle {
+ objectName: "item3"
+ color: "blue"
+ onFocusChanged: focus ? color = "red" : color = "blue"
+ }
+ Rectangle {
+ objectName: "item4"
+ color: "blue"
+ onFocusChanged: focus ? color = "red" : color = "blue"
+ }
+ }
+}