Also ich will gerade das gleiche machen, allerdings will der keinen Text auf meine PixMap malen. Es erscheint nur das geladene Bild. Jemand ne Idee?
Code:
QPixmap img;
QString text;
img.resize(400,300);
img.load("/home/hanf/Documents/ehre.png");
QPainter p(&img);
QFont font( "times", 24 );
p.setFont(font);
int x = (img.width() / 2);
int y = (img.height() / 2);
text = "haaaaalllooo aaaaaallleeeeexxxxxxx";
p.drawText(x,y,text);
p.end();
imgLabel->setAutoResize(true);
imgLabel->setPixmap(img);
Gruß,
Ace
Lesezeichen