I know that if I want animate roatation have to do (this is part of my code):
Qt Code:
  1. QState *state = new QState(parent);
  2. state->assignProperty(objects.at(i), "geometry", selectedRect);
  3. state->assignProperty(objects.at(i), "rotation", 45);
To copy to clipboard, switch view to plain text mode 
objets - QObjectList of instance of my class that inherits QGraphicsWidget

I want to make rotation for example by the Z-axis.
I know that with QGraphicsWidget i can use setTransform(QTransform().rotate(180, Qt::ZAxis)) but I have no idea how to make this in QState. thanks for help