PDA

View Full Version : Problem when rotating and resizing a QGraphicsItem



nilot
24th July 2016, 15:03
Hello,
I am using Qt5 and I want to be able to translate, resize and rotate a rectangle. I have two classes : MyGraphicsWidget which is a QGraphicsWidget and represents the rectangle, and MyResizeHandle which is a QGraphicsRectItem which gives the ability to resize or rotate the rectangle.

The problem is discribed by the following pictures :
12041

The left handle is dedicated to the rotation, the right one to the resizing. As you can see on the last image, after a rotation ( and only after a rotation), when I click on the right handle to resize the rectangle, the size of the rectangle suddenly change. I want to correct this behaviour but I am unable to see the error in my code :12042

Do you see what's wrong ?
Thank you.