summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextformat.h
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2018-10-31 10:33:07 +0100
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2018-12-04 06:18:00 +0000
commitffeefaac6273b8bdb81876a5cc26e15cb9353955 (patch)
treebb8310b84be1582189631237d914ac23f588db08 /src/gui/text/qtextformat.h
parentf213e818f03d35cb82e3daf187415197fd156f8e (diff)
Support style name property in QTextCharFormat
The support for setting the style name in the QTextDocument API was never added, as revealed by the example in the linked bug report. The actual bug reported there (style names not working with some Helvetica Neue) is not reproducible anymore. [ChangeLog][QtGui][Text] Added support for setting the font's style name in QTextCharFormat. Task-number: QTBUG-22813 Change-Id: I8f4d12151c3611aa30965fd963bc93f7c4264e23 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/text/qtextformat.h')
-rw-r--r--src/gui/text/qtextformat.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/text/qtextformat.h b/src/gui/text/qtextformat.h
index d27d2e7f17..f292feabe8 100644
--- a/src/gui/text/qtextformat.h
+++ b/src/gui/text/qtextformat.h
@@ -189,6 +189,7 @@ public:
FontKerning = 0x1FE5,
FontHintingPreference = 0x1FE6,
FontFamilies = 0x1FE7,
+ FontStyleName = 0x1FE8,
FontFamily = 0x2000,
FontPointSize = 0x2001,
FontSizeAdjustment = 0x2002,
@@ -434,6 +435,11 @@ public:
inline QVariant fontFamilies() const
{ return property(FontFamilies); }
+ inline void setFontStyleName(const QString &styleName)
+ { setProperty(FontStyleName, styleName); }
+ inline QVariant fontStyleName() const
+ { return property(FontStyleName); }
+
inline void setFontPointSize(qreal size)
{ setProperty(FontPointSize, size); }
inline qreal fontPointSize() const