int height = 1;
foreach(QTextLayout::FormatRange fr, formatList) {
height = qMax(height, QFontMetrics(fr.format.font()).height());
int height = 1;
foreach(QTextLayout::FormatRange fr, formatList) {
height = qMax(height, QFontMetrics(fr.format.font()).height());