Use QPainter::drawStaticText() to render strings with the same attribute.