PDA

View Full Version : rotation and mouse event identification



kiransu123
13th March 2007, 02:32
hi i m kiran
i wnt to rotate the image is there any funtion by which i can rotate the img
i want to zoom the part of img selected by the mouse so i hav to find the coordinates selected by mouse so is there any way to select the mouse coordinates

wysota
13th March 2007, 08:43
You have mouse coordinates in all mouse events and you can rotate an image either by creating a new image, opening a painter on it, rotating the painter and drawing the original image on it or by simply drawing the original image rotated (by rotating the widget painter) in the first place.

aamer4yu
14th March 2007, 05:41
U can use void QPainter::rotate ( qreal angle) for rotating images thru a painter,

and for capturing mouse events u can override mousePressEvent, and get the position of the mouse by event->pos() .

Hope this helps :)