7#include <QtWidgets/qtwidgetsglobal.h>
8#include <QtWidgets/qcombobox.h>
9#include <QtGui/qfontdatabase.h>
21 Q_PROPERTY(FontFilters fontFilters READ fontFilters WRITE setFontFilters)
22 Q_PROPERTY(
QFont currentFont READ currentFont WRITE setCurrentFont NOTIFY currentFontChanged)
34 NonScalableFonts = 0x2,
35 MonospacedFonts = 0x4,
36 ProportionalFonts = 0x8
41 void setFontFilters(FontFilters
filters);
42 FontFilters fontFilters()
const;
44 QFont currentFont()
const;
45 QSize sizeHint()
const override;
50 void setSampleTextForFont(
const QString &fontFamily,
const QString &sampleText);
54 std::optional<QFont> displayFont(
const QString &fontFamily)
const;
57 void setCurrentFont(
const QFont &
f);
The QComboBox widget combines a button with a dropdown list.
The QFontComboBox widget is a combobox that lets the user select a font family.
void currentFontChanged(const QFont &f)
This signal is emitted whenever the current font changes, with the new font.
FontFilter
This enum can be used to only show certain types of fonts in the font combo box.
\threadsafe \inmodule QtGui
WritingSystem
\value Any \value Latin \value Greek \value Cyrillic \value Armenian \value Hebrew \value Arabic \val...
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
#define Q_DECLARE_FLAGS(Flags, Enum)
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
#define QT_REQUIRE_CONFIG(feature)
const QStringList filters({"Image files (*.png *.xpm *.jpg)", "Text files (*.txt)", "Any files (*)" })
[6]