I'm creating a very simple image editor on Qt. The user can open an image(the image is displayed on a QGraphicsView) and he has the ability to rotate either clockwise or counterclockwise.Then he can save the rotated image.Here lies my problem.How can i get the rotated image displayed in the QGraphicsView and then save it?
Here is my code of opening the image file.The variable image is QPixmap type and the imageObject is a QImage pointer.

Take a look at this method:
As for the rotation, the method you need is
void QGraphicsItem::setRotation(qreal angle)or alternativelyvoid QGraphicsView::rotate(qreal angle)- depending on whether you want to rotate the item or the entire view.