aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickfocusscope/data/signalEmission.qml
blob: 999a40c5adce5ca483f4bba55702804b9ffeb52f (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 2.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"
        }
    }
}