title: Qt animation problem - flickering geometry animation
body: <p>I have a problem creating a simple animation with Qt animation.
  I have a small image located at the bottom right corner of the screen, i am trying to create animation that will enlarge the picture by streching it from the the top left corner of the image and streching it to the center of the screen.
  I managed to do that, but, it's very notiable that qanimation makes it flicker (the right border of the picture, and it doesn't turns out good) 
  I also did that with no animation, but with a timer, and changing window geometry , but i had the same problem, seems that it's not refreshing fast enough, creating flickering in the right border of the picture.</p>
  
  <p>here are the 2 examples:</p>
  
  <p>1 - using property animation (geometery)</p>
  
  <pre><code>animation = new QPropertyAnimation(this, "geometry");
  animation-&gt;setDuration(555);
  animation-&gt;setEasingCurve(QEasingCurve::Linear);
  animation-&gt;setStartValue(QRect(availableScreenSize.width()  -minWidth
      -WINDOW_PADDING,availableScreenSize.height() - minHeight
      -WINDOW_PADDING,minWidth,minHeight));
  animation-&gt;setEndValue(QRect(availableScreenSize.width() - maxWidth
      -WINDOW_PADDING,availableScreenSize.height() - maxHeight
      -WINDOW_PADDING,maxWidth,maxHeight));
  </code></pre>
  
  <p>2 - using a timer</p>
  
  <pre><code>#include "widget.h"
  #include "ui_widget.h"
  #include &lt;QDesktopWidget&gt;
  #include &lt;QDebug&gt;
  
  Widget::Widget(QWidget *parent) :
  QWidget(parent),
  ui(new Ui::Widget)
  {
      ui-&gt;setupUi(this);
      this-&gt;setStyleSheet("background:transparent;");
      this-&gt;setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint
          | Qt::Tool);
  
      availableScreenSize = qApp-&gt;desktop()-&gt;availableGeometry();
  
      //Growing from right to left
      this-&gt;setGeometry(availableScreenSize.width() - 165,
          availableScreenSize.height()-95,160,90);
      //Growing from left to right
      //this-&gt;setGeometry(200,200,160,90);
  
      timeLine = new QTimeLine();
      timeLine-&gt;setDuration(2222);
      timeLine-&gt;setFrameRange(1, 800);
      connect(timeLine, SIGNAL(frameChanged(int)), this, SLOT(update()));
  
      counter = 0;
  
      timeLine-&gt;start();
  }
  
  Widget::~Widget()
  {
      delete ui;
  }
  
  void Widget: aintEvent(QPaintEvent * /* event */)
  {
      counter++;
      qDebug() &lt;&lt; counter;
  
      qApp-&gt;processEvents();
      //Growing from right to left
      this-&gt;setGeometry(availableScreenSize.width()  -165 
          - this-&gt;width()-1,availableScreenSize.height() - 95
          - this-&gt;height()-1,this-&gt;width()+1,this-&gt;height()+1);
  
      //Growing from left to right
      //this-&gt;setGeometry(200,200,this-&gt;width()+1,this-&gt;height()+1);
  
      if(timeLine-&gt;currentFrame() == 800)
      {
          qApp-&gt;exit(1);
      }
  }
  </code></pre>
  
  <p>Now the weired thing here is that if the animation is from left 2 right - it looks smooth... once the direction is changed from right 2 left the entire right border is "jumpy" .</p>
  
  <p>I'll appriciate any help that you can give me.
  Thanks! </p>