我需要在 qml 中创建类似命运轮的东西。我知道如何使用旋转动画,但我无法根据时间降低旋转速度。最后这个动画应该在没有用户交互的情况下停止。在这种情况下我应该使用什么?
最佳答案
@Frank Osterfeld 已经说过了,所以我只是在这里举一个小例子:
Rectangle {
anchors.centerIn: parent
radius: 100
clip: true
width: 200
height: 200
color: "yellow"
Text {
text: "+"
font.pixelSize: 200
anchors.centerIn: parent
}
PropertyAnimation on rotation {
from: 0
to: 3600
duration: 10000
running: true
easing.type: Easing.InOutQuint
}
}
关于javascript - 如何根据时间降低 qml 中的旋转速度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35255772/