水平平移

import QtQuick 2.0





Rectangle {

     width: 1000; height: 500

     Image {

         id: front

         source: "1.png"

         Image {

             id: back

             source: "2.png"

         SequentialAnimation on x {

                                      id: animation2

                                      running:false

         NumberAnimation  { from: 300 ;to: 800; duration: 1500 }

        }

        }

        MouseArea {

                  anchors.fill: parent

                  onClicked:animation2.running=true

        }

    }

}

 

你可能感兴趣的:(水平平移)