PDA

View Full Version : rotate in QState



estel
21st October 2009, 13:39
I know that if I want animate roatation have to do (this is part of my code):


QState *state = new QState(parent);
state->assignProperty(objects.at(i), "geometry", selectedRect);
state->assignProperty(objects.at(i), "rotation", 45);

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