1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Fixed broken text display in Qt < 5.4

(Qt bug workaround)
This commit is contained in:
Martin Tůma 2019-05-15 21:29:34 +02:00
parent 268c42ab03
commit 1f5a051bee

View File

@ -66,8 +66,14 @@ void TextPointItem::paint(QPainter *painter) const
painter->setPen(*_color);
painter->drawText(_textRect, FLAGS, *_text);
} else {
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
img.invertPixels();
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
}
}