三十七、Flipable、Flickable和状态与动画
一、状态与动画
属性动画使用PropertyAnimation on x{ to:100; duration:1000 }
缓冲曲线,在PropertyAnimation里指定 easing.type
一、状态与动画
属性动画使用PropertyAnimation on x{ to:100; duration:1000 }
import QtQuick 1.0
Rectangle {
width: 300;height: 200
Rectangle{
id:page; width:50; height:50
x:0; y:100;
color:"red"
PropertyAnimation on x{ to:100; duration:1000 }
//NumberAnimation on x{ to:100; duration:1000}
PropertyAnimation on color{ to:"blue:"; duration:1000}
//ColorAnimation on color{ to:"blue"; duration:1000}
}
}
缓冲曲线,在PropertyAnimation里指定 easing.type
import QtQuick 1.0
Rectangle {
width: 300;height: 200
Rectangle{
id:page; width:50; height:50
x:0; y:100;
color:"red"
PropertyAnimation on x{ to:100; duration:1000; easing.type: "InOutElastic"}
}
}
状态过度动画 使用