tests/auto/declarative/qmlvisual/focusscope/test2.qml
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 02 Sep 2010 21:20:32 +0300
changeset 34 a33bf25e6f72
parent 33 3e2da88830cd
permissions -rw-r--r--
Revision: 201033 Kit: 201035

import Qt 4.7

Rectangle {
    color: "white"
    width: 800
    height: 600

    Text { text: "All five rectangles should be red" }

    FocusScope {
        y: 100
        focus: true
        Rectangle { width: 50; height: 50; color: parent.activeFocus?"red":"blue" }

        FocusScope {
            y: 100
            focus: true
            Rectangle { width: 50; height: 50; color: parent.activeFocus?"red":"blue" }

            FocusScope {
                y: 100
                focus: true
                Rectangle { width: 50; height: 50; color: parent.activeFocus?"red":"blue" }

                FocusScope {
                    y: 100
                    focus: true
                    Rectangle { width: 50; height: 50; color: parent.activeFocus?"red":"blue" }

                    FocusScope {
                        y: 100
                        focus: true
                        Rectangle { width: 50; height: 50; color: parent.activeFocus?"red":"blue" }
                    }
                }
            }
        }
    }

}