Your problem is that your animation "frames" number is a function of the text size.
You should have that as a constant, if you want the same speed effect.
Qt Code:
  1. register int scrItembrw=scrItem->boundingRect().width();
  2. for (register int i=0; i<(n+scrItembrw) /*this should be a constant*/; i=i+1)
  3. {
  4. register QPointF p(0,h); //sets the position of scrItem
  5. p.setX(n-i);
  6. p.setY(h);
  7. animation->setPosAt(i/(n+scrItembrw),p);
  8.  
  9. }//end for
To copy to clipboard, switch view to plain text mode