I want to rotate a pixmap from its xAxis, but it just rotates from top left corner.(I want it to be rotated from the center) here is my code:
QTransform *X = new QTransform();
X->translate(pixmap().size().width() / 2, pixmap().size().height() / 2);
X->rotate(rtn, Qt::XAxis); //rtn is an angle
setTransform(*X);
It seems that the translate method does not change the origin point to the center of my pixmap. Now I want some help to solve this problem.