PDA

View Full Version : QPixmap Rotating but not translating



Qt Coder
8th April 2009, 11:40
Hello all

I m using Qt 4.4.3


In my application I need to rotate as well as move a QPixmap vertically up ...

I m using below code


QLabel CenterArc;
QPixmap pPixCenter;
QMatrix matrix;
pPixCenter.load(QString::fromUtf8("Images/BG.png"));


i++;
matrix.rotate(i);
matrix.translate(220,48-i);
// (220,48) are original Coordinates of my Qlabel on which I have set this QPixmap

CenterArc.setPixmap(pPixCenter.transformed(matrix) );


The QPixmap is rotating ,but its not moving vertically up i.e. its not transforming

Please Help..