360旋转

import QtQuick 2.0

Rectangle {
 id: rect
  width: 360; height: 630
  Image {
      id: front
      source: "1.png"
      Image {
          id: back
          source: "2.png"
states: State {
        name: "rotated"; PropertyChanges { target: back; rotation: 180 }
                   }
 RotationAnimation on rotation {
     id:animation2
     running:false
              easing.type: Easing.InOutBack;
              duration:900
                   loops: 1
                   from: 0
                   to: 360
               }
          MouseArea {
              anchors.fill: parent
              onClicked:{animation2.running = true;back.state="rotated"
                  Component.onCompleted=back.destroy(1000)}}
          }
      }
  }

 

posted on 2013-02-23 12:12  小风儿_xf  阅读(171)  评论(0编辑  收藏  举报

导航