From c27d5bfbe80bfeb583a25404f4ccee4b70b010e0 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Thu, 19 Jul 2018 22:51:54 +0200 Subject: [PATCH 1/1] QssParser: Interpret "oblique" as italic This is better than nothing. --- src/uisupport/qssparser.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/uisupport/qssparser.cpp b/src/uisupport/qssparser.cpp index d42b651b..166648f1 100644 --- a/src/uisupport/qssparser.cpp +++ b/src/uisupport/qssparser.cpp @@ -728,9 +728,9 @@ void QssParser::parseFont(const QString &value, QTextCharFormat *format) format->setFontItalic(true); else if (prop == "underline") format->setFontUnderline(true); - // Oblique is not a property supported by QTextCharFormat - //else if(prop == "oblique") - // format->setStyle(QFont::StyleOblique); + else if(prop == "oblique") + // Oblique is not a property supported by QTextCharFormat + format->setFontItalic(true); else if (prop == "bold") format->setFontWeight(QFont::Bold); else { // number @@ -758,9 +758,9 @@ void QssParser::parseFontStyle(const QString &value, QTextCharFormat *format) format->setFontUnderline(true); else if (value == "strikethrough") format->setFontStrikeOut(true); - // Oblique is not a property supported by QTextCharFormat - //else if(value == "oblique") - // format->setStyle(QFont::StyleOblique); + else if(value == "oblique") + // Oblique is not a property supported by QTextCharFormat + format->setFontItalic(true); else { qWarning() << Q_FUNC_INFO << tr("Invalid font style specification: %1").arg(value); } -- 2.20.1