blob: a10dbae629ad099355e1bbcdcb3df0cc536d6dd1 (
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
|
// Copyright (C) 2021 The Qt Company Ltd.
// Copyright (C) 2019 Luxoft Sweden AB
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick 2.11
Rectangle {
id: root
width: 320
height: 240
color: "lightsteelblue"
Rectangle {
anchors.centerIn: parent
width: 180; height: 180; radius: width/4
color: "orange"
RotationAnimation on rotation {
id: rotation
from: 0; to: 360; loops: Animation.Infinite; duration: 2000
}
MouseArea {
anchors.fill: parent
onClicked: rotation.paused = !rotation.paused
}
}
}
|