Hello all,
I am fighting with a problem regarding mapping a rectangle which is not of
QRect type. I want to rotate the rectangle 90 degree counterclockwise and
I just did it as follow but the result is not what I want.Instead the rectangle
gets larger in size. Can someone give me suggestions how to solve this problem?
Code:
QWMatrix matrixWorld; QRect newRect; double rotateDegree = 90.0; newRect.setRect(myRect.Left(), myRect.Top(), myRect.Width(), myRect.Height()); matrixWorld.rotate(rotateDegree); newRect = matrixWorld.mapRect(newRect); myRect.Rect(newRect.left(), newRect.top(), newRect.width(), newRect.height());