Hi all,
I create a small application with QGraphicsView, QGraphicsScene, QGraphicsRectItem and thread: a view display many icons( subclass QGraphicsRectItem and QThread) in left, right, and one in center of view. When user click on a left item, the central one will move to right and the clicked one will move from left to center( animation). Each object icon subclass from QGraphicsRectItem and QThread:

Qt Code:
  1. class RectIcon: public QThread, QGraphicsRectItem
  2. {
  3. RectIcon(QString imagePath); //contain the path of image to load.
  4.  
  5. void paint(...); // draw the item
  6. protected:
  7. void run();
  8.  
  9.  
  10. private:
  11. void toLeft();//move the image from right or center to left
  12. void toRight(); // change the position by rotate and transform.
  13. void leftToCenter();
  14. void rightToCenter();
  15.  
  16. };
  17.  
  18. RectIcon::run() // this will be called when user click on one item, this item will be move to center and the central one will to right or left.
  19.  
  20. {
  21. while( _canRun)
  22. {
  23. toLeft();
  24. toRight();
  25. leftToCenter();
  26. rightToCenter();
  27. usleep( 19000);
  28. }
  29. }
To copy to clipboard, switch view to plain text mode 

When user click on one item( left or right), the view will specify the clicked item and call start() function, in run() function, we will translate, rotate and change the position of this item. in a short time( after running the application about 3-4 minutes), it's right- the clicked item can move to the center. after that, although the item change the position but the view is not refresh to see animation. to see the latest images, we must resize the view window.

Could you tell me why and how to resolve this problem( view can refresh)?
Thanks!