Explicitly set the text format (optimization)

This commit is contained in:
Martin Tůma 2019-10-05 18:38:24 +02:00
parent 8da172c0ff
commit cc0c16cfd6

View File

@ -140,6 +140,7 @@ void TextPointItem::paint(QPainter *painter) const
if (hasHalo()) {
QStaticText st(text());
st.setTextFormat(Qt::PlainText);
st.setTextWidth(textRect.width());
st.setTextOption(QTextOption(Qt::AlignHCenter));
st.setPerformanceHint(QStaticText::AggressiveCaching);