Hello

I try to rotate a item, the item was added in a graphicsscene, add the image jpg before the circle, i add the circle with mousepresevent with parameters xmouse and ymouse.




the promlem when i rotate the item (circle) the rotating point it uses is the point 0,0 of the image jpg, as it shows in the image.

numbers in the image
1.- Qgraphicsscene inside the Qgraphicsview
2.- Image JPG
3.-Item (circle) rotate fine
4.-Item (circle) rotate wrong


Qt Code:
  1. a = math.pi/45* value
  2. sina = math.sin(a)
  3. cosa = math.cos(a)
  4. translationTransform=QTransform(1, 0, 0, 1, 0, 0);
  5. rotationTransform=QTransform(cosa, sina, -sina, cosa, 0, 0);
  6. scalingTransform=QTransform(1., 0, 0, 1.0, 0, 0);
  7. transform = scalingTransform * rotationTransform * translationTransform;
  8. self.scene.selectedItems()[0].setTransform(transform)
To copy to clipboard, switch view to plain text mode 

How i can do to rotate the circle from the center of the circle.


Sorry for my english.