Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/qt/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何根据时间降低qml中的转速?_Javascript_Qt_Qml - Fatal编程技术网

Javascript 如何根据时间降低qml中的转速?

Javascript 如何根据时间降低qml中的转速?,javascript,qt,qml,Javascript,Qt,Qml,我需要在qml中创建类似命运轮的东西。我知道如何使用旋转动画,但我不能根据时间降低旋转速度。这个动画最终应该在没有用户交互的情况下停止。在这种情况下我应该使用什么?@Frank Osterfeld已经说过了,所以我在这里举了一个小例子: Rectangle { anchors.centerIn: parent radius: 100 clip: true width: 200 height: 200 color: "yellow" Text

我需要在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
    }
}

@弗兰克·奥斯特菲尔德(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
    }
}

使用计时器来改变旋转。你能提供一些例子吗?你可以使用自定义缓和曲线。我已经尝试过了。也许我做错了什么。使用计时器来改变旋转。你能提供一些例子吗?你可以使用自定义缓和曲线。我已经尝试过了。也许我做错了什么。