Well, it must be in your definition of the class. Following works fine on my system:
Qt Code:
  1. class MyPixmap : public QObject, public QGraphicsPixmapItem
  2. {
  3. Q_OBJECT
  4. Q_PROPERTY (qreal rotation READ rotation WRITE setRotation)
  5. };
  6.  
  7. int main(int argc, char **argv)
  8. {
  9. QApplication app(argc, argv);
  10. MyPixmap *it = new MyPixmap();
  11. QPropertyAnimation* anim = new QPropertyAnimation(it, "rotation");
  12. qWarning() << anim->propertyName();
  13. delete anim;
  14. delete it;
  15. return 0;
  16. }
To copy to clipboard, switch view to plain text mode