QFont::setPixelSize adds extra top padding.



  • I have following code:
    @
    QFont serifFont("Times");
    serifFont.setPixelSize(20);

    QFontMetrics m (serifFont);
    qDebug() <<  m.height();
    

    @

    This gives an output 26???, so real size of font is 26px. This make very difficult to predict real size of font.


Log in to reply
 

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