title: Qt Animation
body: <p>I'm having trouble understanding how QGraphicsItemAnimation's setScaleAt function works.  Here's the code I'm using:</p>
  
  <pre><code>    QGraphicsItem *item=scene.addEllipse(400, 300, 100, 100, QPen(), QBrush(Qt::SolidPattern));
      QTimeLine *timeline=new QTimeLine(3000);
      timeline-&gt;setFrameRange(0, 100);
      QGraphicsItemAnimation *animation=new QGraphicsItemAnimation;
      animation-&gt;setItem(item);
      animation-&gt;setTimeLine(timeline);
      for (int i=0; i&lt;100; i++) {
          animation-&gt;setScaleAt(i/100.0, i/100.0, i/100.0);
      }
      connect(timeline, SIGNAL(valueChanged(qreal)), animation, SLOT(setStep(qreal)));
      timeline-&gt;start();
  </code></pre>
  
  <p>All I want it to do is display a dot in the middle of the screen, then have it expand to a circle over 3 seconds.  What this code gets me is a dot that appears in the upper left corner, then grows and simultaneously moves to the middle.  I tried to compensate by setting the position at each step, but this seems pretty convoluted.  There's got to be a cleaner way to do this.</p>
  
  <p>Also, the original item is displayed for a split second before the animation starts, is there any way to hide it by default, then display for the animation?</p>
  
  <p>Thanks in advance.</p>