summaryrefslogtreecommitdiffstats
path: root/experimental/Overlay Tester/main.qml
blob: ee0c54ee0a513e39b51a18e79b57df37c165b5ff (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import QtQuick 2.0

Item {
    id: root

    width: 100
    height: 62

    Repeater {
        id: repeater

        model: 4

        Rectangle {
            width: root.width
            height: root.height
            color: "white"
        }

    }


    Rectangle {
        anchors.centerIn: parent
        width: 100
        height: 100
        color: "black"
        border.color: "red"
        border.width: 2
        antialiasing: true

        NumberAnimation on rotation { from: 0; to: 360; duration: 5000; loops: Animation.Infinite }
    }

    MouseArea {
        anchors.fill: parent
        onClicked: {
            if (mouseY > root.height / 2)
                repeater.model++
            else
                repeater.model--;
        }
    }

    Text {
        text: repeater.model
        anchors.centerIn: parent
        color: "white"
    }

}