a = math.pi/45* value
sina = math.sin(a)
cosa = math.cos(a)
translationTransform=QTransform(1, 0, 0, 1, 0, 0);
rotationTransform=QTransform(cosa, sina, -sina, cosa, 0, 0);
scalingTransform=QTransform(1., 0, 0, 1.0, 0, 0);
transform = scalingTransform * rotationTransform * translationTransform;
self.scene.selectedItems()[0].setTransform(transform)
a = math.pi/45* value
sina = math.sin(a)
cosa = math.cos(a)
translationTransform=QTransform(1, 0, 0, 1, 0, 0);
rotationTransform=QTransform(cosa, sina, -sina, cosa, 0, 0);
scalingTransform=QTransform(1., 0, 0, 1.0, 0, 0);
transform = scalingTransform * rotationTransform * translationTransform;
self.scene.selectedItems()[0].setTransform(transform)
To copy to clipboard, switch view to plain text mode
Bookmarks