Important: Please read the Qt Code of Conduct -

QFont::setPixelSize adds extra top padding.

  • I have following code:
    QFont serifFont("Times");

    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