
import QtQuick 2.0
Rectangle {
id: rect
width: 100; height: 100
color: "red"
SequentialAnimation {
running: true
NumberAnimation { target: rect; property: "x"; to: 50; duration: 1000 }
NumberAnimation { target: rect; property: "y"; to: 50; duration: 1000 }
}
}
Qt动画示例
本文介绍了一个使用Qt Quick进行矩形动画实现的例子。该例子通过SequentialAnimation实现了一个矩形沿X轴和Y轴移动的动画效果。
2146

被折叠的 条评论
为什么被折叠?



