Quote Originally Posted by babu198649 View Post
i want to rotate a rectangle about its own origin.
Take a piece of paper, draw a cartesian plane with the y axis inverted and the origin in top left corner, draw an arbitrary rectangle on the plane and think what needs to be done to rotate the rectangle around its origin assuming that you can only rotate around the plane origin ([0,0] point).

I have read from the QPainter docs that QPainter has an internal stack which maintains the state of a painter i suppose that the internal state is changed by QMatrix which may lead to crash,but i am not sure ,Please explain how will u crash the system externally and please tell me how to avoid it.
No, this has nothing to do with the painter object. It's strictly about doing anything concerning application logic in a paint event. Think again