Rotate Image in Qlable
I want to make speedometer application in Qt CPP. My idea is set background circle image in Qframe. In Qframe put one label and set needle image on Qlabel and rotate needle 0 to 360 degree.
My query is how to rotate? Can i rotate Qlabel or image? How?
Please help me.
You should create a subclass of QWidget and make a paintevent
Here you first draw the circle image and then use QPainter
to draw rotated Needle.
That will work better than rotating a label.
The clock sample can be inspiration.
Anyway, you should be able do something like
QPixmap pixmap( needlepixmap );
pixmap = pixmap.transformed(rm);