summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qstatictext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/text/qstatictext.cpp')
-rw-r--r--src/gui/text/qstatictext.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp
index d7bf34e..c7817c6 100644
--- a/src/gui/text/qstatictext.cpp
+++ b/src/gui/text/qstatictext.cpp
@@ -584,11 +584,13 @@ void QStaticTextPrivate::paintText(const QPointF &topLeftPosition, QPainter *p)
textLayout.draw(p, topLeftPosition);
} else {
QTextDocument document;
+#ifndef QT_NO_CSSPARSER
QColor color = p->pen().color();
document.setDefaultStyleSheet(QString::fromLatin1("body { color: #%1%2%3 }")
.arg(QString::number(color.red(), 16), 2, QLatin1Char('0'))
.arg(QString::number(color.green(), 16), 2, QLatin1Char('0'))
.arg(QString::number(color.blue(), 16), 2, QLatin1Char('0')));
+#endif
document.setDefaultFont(font);
document.setDocumentMargin(0.0);
if (textWidth >= 0.0)