QPainter same settings but different text sizes
-
Hi,
after i solved my big static problem i now comeing to the smaller problems.
I have a program working with pictures. The pcitures can be of all size.
In this function the pics become a text in the right lower edge. But for some reason it's on some pictures bigger and on others smaller. I cannot say it seams to depend on the size of the pictures.
I wouldn't care, but with the a bigger size the text disappear in the border.@void ImageViewer::setImage(QLabel* ziel, QImage* bild)
{
QPen pen(Qt::red, 2);
QPainter painter(bild);
painter.setPen(pen);
painter.drawText(bild->width()-100,bild->height()-10, "My text to display");ziel->setPixmap( QPixmap::fromImage(*bild) );
ziel->adjustSize();
ziel->setGeometry(8,30,bild->width(),bild->height());
ziel->setWindowIcon(*mainIcon);
ziel->show();
}@i hope you can tell me how to fix :D