Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativefocusscope / data / test2.qml
1 import QtQuick 1.0
2
3 Rectangle {
4     color: "white"
5     width: 800
6     height: 600
7
8     Text { text: "All five rectangles should be red" }
9
10     FocusScope {
11         y: 100
12         focus: true; objectName: "item1"
13         Rectangle { width: 50; height: 50; color: parent.activeFocus?"red":"blue" }
14
15         FocusScope {
16             y: 100
17             focus: true; objectName: "item2"
18             Rectangle { width: 50; height: 50; color: parent.activeFocus?"red":"blue" }
19
20             FocusScope {
21                 y: 100
22                 focus: true; objectName: "item3"
23                 Rectangle { width: 50; height: 50; color: parent.activeFocus?"red":"blue" }
24
25                 FocusScope {
26                     y: 100
27                     focus: true; objectName: "item4"
28                     Rectangle { width: 50; height: 50; color: parent.activeFocus?"red":"blue" }
29
30                     FocusScope {
31                         y: 100
32                         focus: true; objectName: "item5"
33                         Rectangle { width: 50; height: 50; color: parent.activeFocus?"red":"blue" }
34                     }
35                 }
36             }
37         }
38     }
39 }