Rotate QPixmap set on QLabel
Hello All,
I am new to Qt programming.
I m using Qt 4.4.3
I want to rotateQPixmap image set on QLabel
I m using the below code
QPixmap pPixCenter;
pPixCenter.load(QString::fromUtf8("D:/Qt/4.4.3/examples/stylesheet/images/center.gif"));
ui.CenterArc->setPixmap(pPixCenter);
//Code for rotation
QMatrix matrix;
matrix.rotate(12);
pPixCenter = pPixCenter.xForm(matrix);
But when I compile this code it gives me error
'Class QPixmap' has no member named 'xForm'
why is it so......
Re: Rotate QPixmap set on QLabel
:D
Hello All,
I was just searching for previous threads and got a solution for my problem
I done it using below code.
QPixmap pm1=pm.transformed(mat); //saving the changed QPixmap in a new QPixmap
imageLabel->setPixmap(pm1); //setting changed Pixmap on the label