Create a QFontMetrics object explicitly with a QFont.

Since 6c1bdc1854a7700c2b3a345b95f6a2fdca84037d in Qt 5 there is
no longer an implicit conversion.
This commit is contained in:
Stephen Kelly 2012-06-08 17:30:33 +02:00
parent cefe436657
commit 330efc1fa3

View File

@ -273,7 +273,7 @@ void Label::paint(QPainter *painter,
QWidget *widget)
{
QLabel *native = nativeWidget();
QFontMetrics fm = native->font();
QFontMetrics fm(native->font());
//indirect painting still used for fade out
if (native->wordWrap() || native->text().isEmpty() || size().width() >= fm.width(native->text())) {