mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-30 22:51:16 +01:00
Fixed broken text display in Qt < 5.4
(Qt bug workaround)
This commit is contained in:
parent
268c42ab03
commit
1f5a051bee
@ -66,8 +66,14 @@ void TextPointItem::paint(QPainter *painter) const
|
|||||||
painter->setPen(*_color);
|
painter->setPen(*_color);
|
||||||
painter->drawText(_textRect, FLAGS, *_text);
|
painter->drawText(_textRect, FLAGS, *_text);
|
||||||
} else {
|
} else {
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
|
||||||
img.invertPixels();
|
img.invertPixels();
|
||||||
painter->drawImage(_textRect, img);
|
painter->drawImage(_textRect, img);
|
||||||
|
#else // QT >= 5.4
|
||||||
|
QImage iimg(img.convertToFormat(QImage::Format_ARGB32));
|
||||||
|
iimg.invertPixels();
|
||||||
|
painter->drawImage(_textRect, iimg);
|
||||||
|
#endif // QT >= 5.4
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user