PDA

View Full Version : How to generate a pixmap with some text superimposed on a thumbnaill image ?



ada10
1st September 2010, 08:00
I would like to generate a pixmap which contains some text superimposed on a thumbnail image. The pixmap i want is shown in the attachment. How should I go about this ?

5127

Lykurg
1st September 2010, 08:02
You can use QPainter on a pixmap and draw everything you like on it.

ada10
1st September 2010, 08:36
How do I prevent the original pixmap from getting modified & save the modified image to a new pixmap ?

Lykurg
1st September 2010, 08:43
QPixmap original = //...
QPixmap pixWithText = original;
QPainter p(&pixWithText);
//..
pixWithText.save();