aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativefocusscope/data/signalEmission.qml
blob: 5850791704df8e1d0f4001f7db2c7b8b61abf64a (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 QtQuick 1.0

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"
        }
    }
}