title: How to write a number animation on the mouse button press event in QML?
body: <pre><code>import QtQuick 1.0
  
  Rectangle 
  {
    width: 100; height: 100
    color: "red"
  
     MouseArea 
     {
      anchors.fill: parent
  
      onPressed:
      {
        NumberAnimation 
        { 
          target: parent.x
          to: 50; 
          duration: 1000 
        }
      }
    }
  }
  </code></pre>
  
  <p>I expect this code to shift the <code>x</code> position of the rectangle on the button press event, but this does nothing.</p>
  
  <p>Where am I going wrong?</p>