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);
QState *state = new QState(parent);
state->assignProperty(objects.at(i), "geometry", selectedRect);
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
Bookmarks