I want to know how to rotate an image.I have searched the forum but could find what i want.please help.
I want to know how to rotate an image.I have searched the forum but could find what i want.please help.
You can use QGraphicsPixmapItem. QGraphicsItem has rotate(angle) method.
This piece of code can be usefull.
Qt Code:
scene->addItem(pixmapItem); ... pixmapItem->rotate(15);To copy to clipboard, switch view to plain text mode
And read the qassistant for further need...
Last edited by jpn; 16th January 2009 at 15:28. Reason: missing [code] tags
vague question... vague answer...
you can create a QMatrix (or a QTransform) for your rotation angle and then rotate your image (assuming you have a QImage) with QImage::transformed()
HTH
Bookmarks