diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2014-01-17 17:38:55 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-31 00:24:48 +0100 |
commit | f26928cccf7e0fd9f06236476f2a6b52151e5dca (patch) | |
tree | 9464f786b5c27d1b5669e0c09eb87414f9529d64 /src/gui/text/qtextformat.h | |
parent | f6723cf0d479823a34e874bc4cc9ff43e040793a (diff) |
Allow QTextCharFormat::setFont() to skip unresolved font props
This makes the font merging possible and solves an issue
with the default font properties inheritance when used
in conjunction with QTextFormatCollection.
Change-Id: If8b543c011122dde9f086f5d696df3b042f7b90c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/gui/text/qtextformat.h')
-rw-r--r-- | src/gui/text/qtextformat.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/text/qtextformat.h b/src/gui/text/qtextformat.h index c04ac3876b..1906a8a0c2 100644 --- a/src/gui/text/qtextformat.h +++ b/src/gui/text/qtextformat.h @@ -408,7 +408,13 @@ public: QTextCharFormat(); bool isValid() const { return isCharFormat(); } - void setFont(const QFont &font); + + enum FontPropertiesInheritanceBehavior { + FontPropertiesSpecifiedOnly, + FontPropertiesAll + }; + void setFont(const QFont &font, FontPropertiesInheritanceBehavior behavior); + void setFont(const QFont &font); // ### Qt6: Merge with above QFont font() const; inline void setFontFamily(const QString &family) |