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.drawText(bild->width()-100,bild->height()-10, "My text to display");

    ziel->setPixmap( QPixmap::fromImage(*bild) );

    i hope you can tell me how to fix :D

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.