From 330efc1fa3f33363ec95102cf30e8d8337732e4b Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 8 Jun 2012 17:30:33 +0200 Subject: [PATCH] Create a QFontMetrics object explicitly with a QFont. Since 6c1bdc1854a7700c2b3a345b95f6a2fdca84037d in Qt 5 there is no longer an implicit conversion. --- widgets/label.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/label.cpp b/widgets/label.cpp index ebadcf1bd..800271e15 100644 --- a/widgets/label.cpp +++ b/widgets/label.cpp @@ -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())) {