aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickanimations/data/cleanupWhenRenderThreadStops.qml
blob: 4cfb59aeabcad4bf6bf6a805698bb9b193e65544 (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
//main.qml

import QtQuick 2.12
import QtQuick.Window 2.12

Item {
    id: root
    width: 640
    height: 480
    visible: true
    property bool running : false

    Rectangle {
        id: rect
        anchors.fill: parent
        color: "red"

        Component.onCompleted: {
            anim.start()
            running = true
        }
    }

    OpacityAnimator {
        id: anim

        target: rect
        from: 1
        to: 0
        duration: 20000
    }
}