summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativefocusscope/data/signalEmission.qml
blob: 07601c709a48ecb96b6d95d3fa14a357db7aee23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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"
        }
    }
}