Qt那些事0.0.17
阿新 • • 發佈:2019-03-01
寫了一個色彩閃爍的動畫,原理來說就是將兩個colorAnimation放到了SequentialAnimation裡。而呼叫的時候直接start,停止的時候使用stop。
SequentialAnimation{
id:_flash_bg
loops: Animation.Infinite//選擇無限迴圈保證會不停地切換動畫
ColorAnimation {
from: control.check_color
to: control.uncheck_color
duration: 400
target: indicator
properties: "color"
}
ColorAnimation {
to: control.check_color
from: control.uncheck_color
duration: 400
target: indicator
properties: "color"
}
}