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:
parent
cefe436657
commit
330efc1fa3
@ -273,7 +273,7 @@ void Label::paint(QPainter *painter,
|
|||||||
QWidget *widget)
|
QWidget *widget)
|
||||||
{
|
{
|
||||||
QLabel *native = nativeWidget();
|
QLabel *native = nativeWidget();
|
||||||
QFontMetrics fm = native->font();
|
QFontMetrics fm(native->font());
|
||||||
|
|
||||||
//indirect painting still used for fade out
|
//indirect painting still used for fade out
|
||||||
if (native->wordWrap() || native->text().isEmpty() || size().width() >= fm.width(native->text())) {
|
if (native->wordWrap() || native->text().isEmpty() || size().width() >= fm.width(native->text())) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user