You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
625 B
27 lines
625 B
import QtQuick 2.1
|
|
|
|
Rectangle {
|
|
id: rectangle
|
|
color: "red"
|
|
width: 200
|
|
height: 200
|
|
|
|
Text {
|
|
id: text
|
|
text: "This is QML code.\n(Click to pause)"
|
|
font.pointSize: 14
|
|
anchors.centerIn: parent
|
|
PropertyAnimation {
|
|
id: animation
|
|
target: text
|
|
property: "rotation"
|
|
from: 0; to: 360; duration: 5000
|
|
loops: Animation.Infinite
|
|
}
|
|
}
|
|
MouseArea {
|
|
anchors.fill: parent
|
|
onClicked: animation.paused ? animation.resume() : animation.pause()
|
|
}
|
|
Component.onCompleted: animation.start()
|
|
}
|
|
|