PDA

View Full Version : how to rotate a rectangular region of awidget



babu198649
17th March 2008, 07:12
hi
how to rotate a part of the rectangular area inside widgets area.

suppose a widget has a size of QRect(0,0 700x500) now if i want to rotate the area of rectangle QRect(10,10,30,20) with respect to QPoint(10,10) , how to rotate it.

wysota
17th March 2008, 07:26
See QMatrix or QTransform.

WinchellChung
17th March 2008, 13:39
You may or may not find this code useful.
Go to
http://labs.trolltech.com/page/Graphics/Examples
and use Subversion to fetch QTransform 2
When the demo is set to rotate around the Z axis, it is probably doing what you want.