diff options
author | Albert Astals Cid <albert.astals.cid@kdab.com> | 2021-11-25 12:27:50 +0100 |
---|---|---|
committer | Albert Astals Cid <albert.astals.cid@kdab.com> | 2021-12-03 20:35:33 +0100 |
commit | 98c2260c3b928868e4b682b0300074b3d70849ec (patch) | |
tree | 7e2392d46bff38f3a978b85761012479869677c9 /src/widgets/widgets/qfontcombobox.h | |
parent | 63c0a1bd23a904f2691ec3ad11002d3c0759f207 (diff) |
Add QFontComboBox::setDisplayFont
Allows changing the font used to display a font family
[ChangeLog][QtWidgets][QFontComboBox] Added the setDisplayFont() function, in order to be able to control the font used to render the font name and sample text (when previewing the fonts).
Change-Id: I94bfef43142c5346237e3069449bd19dbacb7420
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/widgets/widgets/qfontcombobox.h')
-rw-r--r-- | src/widgets/widgets/qfontcombobox.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/widgets/widgets/qfontcombobox.h b/src/widgets/widgets/qfontcombobox.h index 1eaa58ce0e..18b642680a 100644 --- a/src/widgets/widgets/qfontcombobox.h +++ b/src/widgets/widgets/qfontcombobox.h @@ -86,6 +86,9 @@ public: void setSampleTextForFont(const QString &fontFamily, const QString &sampleText); QString sampleTextForFont(const QString &fontFamily) const; + void setDisplayFont(const QString &fontFamily, const QFont &font); + std::optional<QFont> displayFont(const QString &fontFamily) const; + public Q_SLOTS: void setCurrentFont(const QFont &f); |