qt-bugs@ issue: none applied: no author: raabe This patch fixes the qt_format_text helper used by QPainter so that it computes the height of the overall text correctly. This means that text drawn with the Qt::AlignVCenter flag will not appear correctly, a little bit higher than it used to be. Index: src/gui/painting/qpainter.cpp =================================================================== --- src/gui/painting/qpainter.cpp (revision 450894) +++ src/gui/painting/qpainter.cpp (working copy) @@ -4676,7 +4676,7 @@ l.setLineWidth(lineWidth); height += leading; l.setPosition(QPointF(0., height)); - height += l.ascent() + l.descent(); + height += l.height(); width = qMax(width, l.naturalTextWidth()); } textLayout.endLayout();