summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/declarative/focus/focusColumn.qml
blob: eb59309f40e34fe7dbf32a769db5de40bf80ae60 (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
import QtQuick 1.0

Rectangle {
    width: 200; height: 200

  //  Column {
        FocusScope {
            x: rect1.x; y:rect1.y; width: rect1.width; height: rect1.height
            Rectangle {id: rect1; width: 50; height: 50; focus:true
                   color: focus ? "red":"blue"
            }
            Rectangle {id: rect2; width: 50; height: 50; focus:true
                   color: focus ? "red":"blue"
                    y: 75
            }
//        }
/*
        FocusScope {
            x: rect2.x; y:rect2.y; width: rect2.width; height: rect2.height
            Rectangle {id: rect2; width: 50; height: 50; color: "red"}
       }
*/
    }

}