I want to animate an graphic item in graphics view, I want to this item moving, rotating around y axis, scaling at the same

time. I want to use graphicsview framework and animation framework.

according to the animation framework manual, if I want to animate the graphic view item, I should inhert from Object, and

declare many metaObject properties for the animation framework.

1, declare a class with many animation properties.
Qt Code:
  1. class GraphicItem: public QObject, public QGraphicsRectItem
  2. {
  3. Q_OBJECT
  4. Q_PROPERTY(QPointF pos READ pos WRITE setPos) //for moving property
  5. Q_PROPERTY(float scaleFactor READ scaleFactor WRITE setScaleFactor) //for scaling
  6. Q_PROPERTY(int rotateAngle READ rotateAngle WRITE setRotateAngle) //for rotating
  7.  
  8. /*some functions*/
  9.  
  10. //below is setter and getter funs of the properties.
  11. float scaleFactor() const;
  12. void setScaleFactor(float);
  13. int rotateAngle() const;
  14. void setRotateAngle(int);
  15.  
  16. private:
  17. /*some variables declaration*/
  18. };
To copy to clipboard, switch view to plain text mode 
2. getter and setter funcs are like below, and the pos property has pos getter and setPos setter automatically.
Qt Code:
  1. float GraphicItem::scaleFactor() const
  2. {
  3. return factor;
  4. }
  5.  
  6. void GraphicItem::setScaleFactor(float scale)
  7. {
  8. factor = scale;
  9. setScale( scale ); //this can scaling the item
  10. }
  11.  
  12. int GraphicItem::rotateAngle() const
  13. {
  14. return angle;
  15. }
  16. void GraphicItem::setRotateAngle(int a)
  17. {
  18. angle = a;
  19. setTransform(QTransform().rotate(a, Qt::YAxis)); //can rotating the item around y axis
  20. }
To copy to clipboard, switch view to plain text mode 
3, use animation framework to animate the item. item0 is a instance of graphicItem object.

Qt Code:
  1. QPropertyAnimation animation(item0, "pos");
  2. animation.setDuration(1000);
  3. animation.setStartValue(QPointF(-200,0));
  4. animation.setEndValue(QPointF(-400,0));
  5.  
  6. animation.start();
To copy to clipboard, switch view to plain text mode 

I desire it can moving from point (-200,0) to point (-400,0), but it can't moving at all, the same to the other two properites

scaleFactor and rotateAngle.

what's wrong with my code?

please give me some hints, any suggestion is highly appreciated.

thanks