PDA

View Full Version : How to rotate correctly after changing the QGraphicsItem size



gangyi11
24th May 2016, 07:43
Hello.

I'm making a Diagram program and for days I'm stuck with some issue:
i have a customer QMyGraphicsRectItem which inherit QGraphicsItem ,when i drawing a rect in scene, Followed by rotate and then resize .Again this time of rotation, rect position will be change,i donot know why?

item.zip is Screen recording program。It can be found that there is a significant jitter in the second rotation。
drawcli.zip is src.

I'd appreciate any advice. Thanks!

mousePressEvent call setTransformOriginPoint change item's OriginPoint
11953


mouseMoveEvent change angle
11954

demo ui
11955