QFont
#include <QFont>
Public Types
enum | Capitalization { MixedCase, AllUppercase, AllLowercase, SmallCaps, Capitalize } |
enum | HintingPreference { PreferDefaultHinting, PreferNoHinting, PreferVerticalHinting, PreferFullHinting } |
enum | SpacingType { PercentageSpacing, AbsoluteSpacing } |
enum | Stretch { AnyStretch, UltraCondensed, ExtraCondensed, Condensed, ..., UltraExpanded } |
enum | Style { StyleNormal, StyleItalic, StyleOblique } |
enum | StyleHint { AnyStyle, SansSerif, Helvetica, Serif, ..., System } |
enum | StyleStrategy { PreferDefault, PreferBitmap, PreferDevice, PreferOutline, ..., ForceIntegerMetrics } |
enum | Weight { Thin, ExtraLight, Light, Normal, ..., Black } |
Public Functions
QFont() | |
QFont(const QString &family, int pointSize = -1, int weight = -1, bool italic = false) | |
QFont(const QFont &font, QPaintDevice *pd) | |
QFont(const QFont &font) | |
~QFont() | |
bool | bold() const |
QFont::Capitalization | capitalization() const |
QString | defaultFamily() const |
bool | exactMatch() const |
QString | family() const |
bool | fixedPitch() const |
bool | fromString(const QString &descrip) |
QFont::HintingPreference | hintingPreference() const |
bool | isCopyOf(const QFont &f) const |
bool | italic() const |
bool | kerning() const |
QString | key() const |
QString | lastResortFamily() const |
QString | lastResortFont() const |
qreal | letterSpacing() const |
QFont::SpacingType | letterSpacingType() const |
bool | overline() const |
int | pixelSize() const |
int | pointSize() const |
qreal | pointSizeF() const |
QFont | resolve(const QFont &other) const |
void | setBold(bool enable) |
void | setCapitalization(QFont::Capitalization caps) |
void | setFamily(const QString &family) |
void | setFixedPitch(bool enable) |
void | setHintingPreference(QFont::HintingPreference hintingPreference) |
void | setItalic(bool enable) |
void | setKerning(bool enable) |
void | setLetterSpacing(QFont::SpacingType type, qreal spacing) |
void | setOverline(bool enable) |
void | setPixelSize(int pixelSize) |
void | setPointSize(int pointSize) |
void | setPointSizeF(qreal pointSize) |
void | setStretch(int factor) |
void | setStrikeOut(bool enable) |
void | setStyle(QFont::Style style) |
void | setStyleHint(QFont::StyleHint hint, QFont::StyleStrategy strategy = PreferDefault) |
void | setStyleName(const QString &styleName) |
void | setStyleStrategy(QFont::StyleStrategy s) |
void | setUnderline(bool enable) |
void | setWeight(int weight) |
void | setWordSpacing(qreal spacing) |
int | stretch() const |
bool | strikeOut() const |
QFont::Style | style() const |
QFont::StyleHint | styleHint() const |
QString | styleName() const |
QFont::StyleStrategy | styleStrategy() const |
void | swap(QFont &other) |
QString | toString() const |
bool | underline() const |
int | weight() const |
qreal | wordSpacing() const |
QVariant | operator QVariant() const |
bool | operator!=(const QFont &f) const |
bool | operator<(const QFont &f) const |
QFont & | operator=(const QFont &font) |
QFont & | operator=(QFont &&other) |
bool | operator==(const QFont &f) const |
Static Public Members
void | insertSubstitution(const QString &familyName, const QString &substituteName) |
void | insertSubstitutions(const QString &familyName, const QStringList &substituteNames) |
void | removeSubstitutions(const QString &familyName) |
QString | substitute(const QString &familyName) |
QStringList | substitutes(const QString &familyName) |
QStringList | substitutions() |
Related Non-Members
uint | qHash(const QFont &font, uint seed = 0) |
QDataStream & | operator<<(QDataStream &s, const QFont &font) |
QDataStream & | operator>>(QDataStream &s, QFont &font) |
QFont serifFont("Times", 10, QFont::Bold); QFont sansFont("Helvetica [Cronyx]", 12);
QFontInfo info(f1);
QString family = info.family();
###########################
QQ 3087438119