1. 程式人生 > >Qt那些事0.0.17

Qt那些事0.0.17

浪費了“黃金五年”的Java程式設計師,還有救嗎? >>>   

寫了一個色彩閃爍的動畫,原理來說就是將兩個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"
        }
    }