Skip to content

PythonQt.QtGui.QFont · declarations 003

Back to PythonQt.QtGui.QFont

key

key() -> str

X.key() -> str

Supplemental documentation: Qt 5 reference:

QString QFont::key() const

Returns the font's key, a textual representation of a font. It is typically used as the key for a cache or dictionary of fonts.

See also QMap.

Upstream PySide2 reference signatures (binding differences may apply):

key(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#key

lastResortFamily

lastResortFamily() -> str

X.lastResortFamily() -> str

Upstream PySide2 reference signatures (binding differences may apply):

lastResortFamily(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#lastResortFamily

lastResortFont

lastResortFont() -> str

X.lastResortFont() -> str

Upstream PySide2 reference signatures (binding differences may apply):

lastResortFont(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#lastResortFont

letterSpacing

letterSpacing() -> float

X.letterSpacing() -> float

Supplemental documentation: Qt 5 reference:

qreal QFont::letterSpacing() const

Returns the letter spacing for the font.

This function was introduced in Qt 4.4.

See also setLetterSpacing(), letterSpacingType(), and setWordSpacing().

Upstream PySide2 reference signatures (binding differences may apply):

letterSpacing(self) -> float

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#letterSpacing

letterSpacingType

letterSpacingType() -> Any

X.letterSpacingType()

Supplemental documentation: Qt 5 reference:

QFont::SpacingType QFont::letterSpacingType() const

Returns the spacing type used for letter spacing.

This function was introduced in Qt 4.4.

See also letterSpacing(), setLetterSpacing(), and setWordSpacing().

Upstream PySide2 reference signatures (binding differences may apply):

letterSpacingType(self) -> PySide2.QtGui.QFont.SpacingType

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#letterSpacingType

overline

overline() -> bool

X.overline() -> bool

Supplemental documentation: Qt 5 reference:

bool QFont::overline() const

Returns true if overline has been set; otherwise returns false.

See also setOverline().

Upstream PySide2 reference signatures (binding differences may apply):

overline(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#overline

pixelSize

pixelSize() -> int

X.pixelSize() -> int

Supplemental documentation: Qt 5 reference:

int QFont::pixelSize() const

Returns the pixel size of the font if it was set with setPixelSize(). Returns -1 if the size was set with setPointSize() or setPointSizeF().

See also setPixelSize(), pointSize(), QFontInfo::pointSize(), and QFontInfo::pixelSize().

Upstream PySide2 reference signatures (binding differences may apply):

pixelSize(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#pixelSize

pointSize

pointSize() -> int

X.pointSize() -> int

Supplemental documentation: Qt 5 reference:

int QFont::pointSize() const

Returns the point size of the font. Returns -1 if the font size was specified in pixels.

See also setPointSize() and pointSizeF().

Upstream PySide2 reference signatures (binding differences may apply):

pointSize(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#pointSize

pointSizeF

pointSizeF() -> float

X.pointSizeF() -> float

Supplemental documentation: Qt 5 reference:

qreal QFont::pointSizeF() const

Returns the point size of the font. Returns -1 if the font size was specified in pixels.

See also pointSize(), setPointSizeF(), pixelSize(), QFontInfo::pointSize(), and QFontInfo::pixelSize().

Upstream PySide2 reference signatures (binding differences may apply):

pointSizeF(self) -> float

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#pointSizeF

rawMode

rawMode() -> bool

X.rawMode() -> bool

Upstream PySide2 reference signatures (binding differences may apply):

rawMode(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#rawMode

rawName

rawName() -> str

X.rawName() -> str

Upstream PySide2 reference signatures (binding differences may apply):

rawName(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#rawName

removeSubstitutions

removeSubstitutions(arg__1: str) -> None

X.removeSubstitutions(arg__1)

Supplemental documentation: Qt 5 reference:

[static] void QFont::removeSubstitutions(const QString \&familyName)

Removes all the substitutions for familyName.

This function was introduced in Qt 5.0.

See also insertSubstitutions(), insertSubstitution(), substitutions(), and substitute().

Upstream PySide2 reference signatures (binding differences may apply):

removeSubstitutions(arg__1: str) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#removeSubstitutions

resolve

resolve(arg__1: Any) -> int

X.resolve(arg__1) -> int

Supplemental documentation: Qt 5 reference:

QFont QFont::resolve(const QFont \&other) const

Returns a new QFont that has attributes copied from other that have not been previously set on this font.

Upstream PySide2 reference signatures (binding differences may apply):

resolve(self) -> int
resolve(self, arg__1: PySide2.QtGui.QFont) -> PySide2.QtGui.QFont
resolve(self, mask: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#resolve

setBold

setBold(arg__1: bool) -> None

X.setBold(arg__1)

Supplemental documentation: Qt 5 reference:

void QFont::setBold(bool enable)

If enable is true sets the font's weight to QFont::Bold; otherwise sets the weight to QFont::Normal.

For finer boldness control use setWeight().

Note: If styleName() is set, this value may be ignored, or if supported on the platform, the font artificially embolded.

See also bold() and setWeight().

Upstream PySide2 reference signatures (binding differences may apply):

setBold(self, arg__1: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#setBold

setCapitalization

setCapitalization(arg__1: Any) -> None

X.setCapitalization(arg__1)

Supplemental documentation: Qt 5 reference:

void QFont::setCapitalization(QFont::Capitalization caps)

Sets the capitalization of the text in this font to caps.

A font's capitalization makes the text appear in the selected capitalization mode.

This function was introduced in Qt 4.4.

See also capitalization().

Upstream PySide2 reference signatures (binding differences may apply):

setCapitalization(self, arg__1: PySide2.QtGui.QFont.Capitalization) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#setCapitalization

setFamily

setFamily(arg__1: str) -> None

X.setFamily(arg__1)

Supplemental documentation: Qt 5 reference:

void QFont::setFamily(const QString \&family)

Sets the family name of the font. The name is case insensitive and may include a foundry name.

The family name may optionally also include a foundry name, e.g. "Helvetica [Cronyx]". If the family is available from more than one foundry and the foundry isn't specified, an arbitrary foundry is chosen. If the family isn't available a family will be set using the font matching algorithm.

See also family(), setStyleHint(), and QFontInfo.

Upstream PySide2 reference signatures (binding differences may apply):

setFamily(self, arg__1: str) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#setFamily

setFixedPitch

setFixedPitch(arg__1: bool) -> None

X.setFixedPitch(arg__1)

Supplemental documentation: Qt 5 reference:

void QFont::setFixedPitch(bool enable)

If enable is true, sets fixed pitch on; otherwise sets fixed pitch off.

See also fixedPitch() and QFontInfo.

Upstream PySide2 reference signatures (binding differences may apply):

setFixedPitch(self, arg__1: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#setFixedPitch

setHintingPreference

setHintingPreference(hintingPreference: Any) -> None

X.setHintingPreference(hintingPreference)

Supplemental documentation: Qt 5 reference:

void QFont::setHintingPreference(QFont::HintingPreference hintingPreference)

Set the preference for the hinting level of the glyphs to hintingPreference. This is a hint to the underlying font rendering system to use a certain level of hinting, and has varying support across platforms. See the table in the documentation for QFont::HintingPreference for more details.

The default hinting preference is QFont::PreferDefaultHinting.

This function was introduced in Qt 4.8.

See also hintingPreference().

Upstream PySide2 reference signatures (binding differences may apply):

setHintingPreference(self, hintingPreference: PySide2.QtGui.QFont.HintingPreference) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#setHintingPreference

setItalic

setItalic(b: bool) -> None

X.setItalic(b)

Supplemental documentation: Qt 5 reference:

void QFont::setItalic(bool enable)

Sets the style() of the font to QFont::StyleItalic if enable is true; otherwise the style is set to QFont::StyleNormal.

Note: If styleName() is set, this value may be ignored, or if supported on the platform, the font may be rendered tilted instead of picking a designed italic font-variant.

See also italic() and QFontInfo.

Upstream PySide2 reference signatures (binding differences may apply):

setItalic(self, b: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#setItalic

setKerning

setKerning(arg__1: bool) -> None

X.setKerning(arg__1)

Supplemental documentation: Qt 5 reference:

void QFont::setKerning(bool enable)

Enables kerning for this font if enable is true; otherwise disables it. By default, kerning is enabled.

When kerning is enabled, glyph metrics do not add up anymore, even for Latin text. In other words, the assumption that width('a') + width('b') is equal to width("ab") is not necessarily true.

See also kerning() and QFontMetrics.

Upstream PySide2 reference signatures (binding differences may apply):

setKerning(self, arg__1: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#setKerning

setLetterSpacing

setLetterSpacing(type: Any, spacing: float) -> None

X.setLetterSpacing(type, spacing)

Supplemental documentation: Qt 5 reference:

void QFont::setLetterSpacing(QFont::SpacingType type, qreal spacing)

Sets the letter spacing for the font to spacing and the type of spacing to type.

Letter spacing changes the default spacing between individual letters in the font. The spacing between the letters can be made smaller as well as larger either in percentage of the character width or in pixels, depending on the selected spacing type.

This function was introduced in Qt 4.4.

See also letterSpacing(), letterSpacingType(), and setWordSpacing().

Upstream PySide2 reference signatures (binding differences may apply):

setLetterSpacing(self, type: PySide2.QtGui.QFont.SpacingType, spacing: float) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#setLetterSpacing

setOverline

setOverline(arg__1: bool) -> None

X.setOverline(arg__1)

Supplemental documentation: Qt 5 reference:

void QFont::setOverline(bool enable)

If enable is true, sets overline on; otherwise sets overline off.

See also overline() and QFontInfo.

Upstream PySide2 reference signatures (binding differences may apply):

setOverline(self, arg__1: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#setOverline

setPixelSize

setPixelSize(arg__1: int) -> None

X.setPixelSize(arg__1)

Supplemental documentation: Qt 5 reference:

void QFont::setPixelSize(int pixelSize)

Sets the font size to pixelSize pixels.

Using this function makes the font device dependent. Use setPointSize() or setPointSizeF() to set the size of the font in a device independent manner.

See also pixelSize().

Upstream PySide2 reference signatures (binding differences may apply):

setPixelSize(self, arg__1: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#setPixelSize

setPointSize

setPointSize(arg__1: int) -> None

X.setPointSize(arg__1)

Supplemental documentation: Qt 5 reference:

void QFont::setPointSize(int pointSize)

Sets the point size to pointSize. The point size must be greater than zero.

See also pointSize() and setPointSizeF().

Upstream PySide2 reference signatures (binding differences may apply):

setPointSize(self, arg__1: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#setPointSize

setPointSizeF

setPointSizeF(arg__1: float) -> None

X.setPointSizeF(arg__1)

Supplemental documentation: Qt 5 reference:

void QFont::setPointSizeF(qreal pointSize)

Sets the point size to pointSize. The point size must be greater than zero. The requested precision may not be achieved on all platforms.

See also pointSizeF(), setPointSize(), and setPixelSize().

Upstream PySide2 reference signatures (binding differences may apply):

setPointSizeF(self, arg__1: float) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#setPointSizeF

setRawMode

setRawMode(arg__1: bool) -> None

X.setRawMode(arg__1)

Upstream PySide2 reference signatures (binding differences may apply):

setRawMode(self, arg__1: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#setRawMode

setRawName

setRawName(arg__1: str) -> None

X.setRawName(arg__1)

Upstream PySide2 reference signatures (binding differences may apply):

setRawName(self, arg__1: str) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#setRawName

setStretch

setStretch(arg__1: int) -> None

X.setStretch(arg__1)

Supplemental documentation: Qt 5 reference:

void QFont::setStretch(int factor)

Sets the stretch factor for the font.

The stretch factor matches a condensed or expanded version of the font or applies a stretch transform that changes the width of all characters in the font by factor percent. For example, setting factor to 150 results in all characters in the font being 1.5 times (ie. 150%) wider. The minimum stretch factor is 1, and the maximum stretch factor is 4000. The default stretch factor is AnyStretch, which will accept any stretch factor and not apply any transform on the font.

The stretch factor is only applied to outline fonts. The stretch factor is ignored for bitmap fonts.

Note: When matching a font with a native non-default stretch factor, requesting a stretch of 100 will stretch it back to a medium width font.

See also stretch() and QFont::Stretch.

Upstream PySide2 reference signatures (binding differences may apply):

setStretch(self, arg__1: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#setStretch

setStrikeOut

setStrikeOut(arg__1: bool) -> None

X.setStrikeOut(arg__1)

Supplemental documentation: Qt 5 reference:

void QFont::setStrikeOut(bool enable)

If enable is true, sets strikeout on; otherwise sets strikeout off.

See also strikeOut() and QFontInfo.

Upstream PySide2 reference signatures (binding differences may apply):

setStrikeOut(self, arg__1: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#setStrikeOut

setStyle

setStyle(style: Any) -> None

X.setStyle(style)

Supplemental documentation: Qt 5 reference:

void QFont::setStyle(QFont::Style style)

Sets the style of the font to style.

See also style(), italic(), and QFontInfo.

Upstream PySide2 reference signatures (binding differences may apply):

setStyle(self, style: PySide2.QtGui.QFont.Style) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#setStyle

setStyleHint

setStyleHint(arg__1: Any, arg__2: Any) -> None

X.setStyleHint(arg__1, arg__2)

Supplemental documentation: Qt 5 reference:

void QFont::setStyleHint(QFont::StyleHint hint, QFont::StyleStrategy strategy \= PreferDefault)

Sets the style hint and strategy to hint and strategy, respectively.

If these aren't set explicitly the style hint will default to AnyStyle and the style strategy to PreferDefault.

Qt does not support style hints on X11 since this information is not provided by the window system.

See also StyleHint, styleHint(), StyleStrategy, styleStrategy(), and QFontInfo.

Upstream PySide2 reference signatures (binding differences may apply):

setStyleHint(self, arg__1: PySide2.QtGui.QFont.StyleHint, strategy: PySide2.QtGui.QFont.StyleStrategy=...) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#setStyleHint

setStyleName

setStyleName(arg__1: str) -> None

X.setStyleName(arg__1)

Supplemental documentation: Qt 5 reference:

void QFont::setStyleName(const QString \&styleName)

Sets the style name of the font to styleName. When set, other style properties like style() and weight() will be ignored for font matching, though they may be simulated afterwards if supported by the platform's font engine.

Due to the lower quality of artificially simulated styles, and the lack of full cross platform support, it is not recommended to use matching by style name together with matching by style properties

This function was introduced in Qt 4.8.

See also styleName().

Upstream PySide2 reference signatures (binding differences may apply):

setStyleName(self, arg__1: str) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#setStyleName

setStyleStrategy

setStyleStrategy(s: Any) -> None

X.setStyleStrategy(s)

Supplemental documentation: Qt 5 reference:

void QFont::setStyleStrategy(QFont::StyleStrategy s)

Sets the style strategy for the font to s.

See also styleStrategy() and QFont::StyleStrategy.

Upstream PySide2 reference signatures (binding differences may apply):

setStyleStrategy(self, s: PySide2.QtGui.QFont.StyleStrategy) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#setStyleStrategy

setUnderline

setUnderline(arg__1: bool) -> None

X.setUnderline(arg__1)

Supplemental documentation: Qt 5 reference:

void QFont::setUnderline(bool enable)

If enable is true, sets underline on; otherwise sets underline off.

See also underline() and QFontInfo.

Upstream PySide2 reference signatures (binding differences may apply):

setUnderline(self, arg__1: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#setUnderline

setWeight

setWeight(arg__1: int) -> None

X.setWeight(arg__1)

Supplemental documentation: Qt 5 reference:

void QFont::setWeight(int weight)

Sets the weight of the font to weight, using the scale defined by QFont::Weight enumeration.

Note: If styleName() is set, this value may be ignored for font selection.

See also weight() and QFontInfo.

Upstream PySide2 reference signatures (binding differences may apply):

setWeight(self, arg__1: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#setWeight

setWordSpacing

setWordSpacing(spacing: float) -> None

X.setWordSpacing(spacing)

Supplemental documentation: Qt 5 reference:

void QFont::setWordSpacing(qreal spacing)

Sets the word spacing for the font to spacing.

Word spacing changes the default spacing between individual words. A positive value increases the word spacing by a corresponding amount of pixels, while a negative value decreases the inter-word spacing accordingly.

Word spacing will not apply to writing systems, where indiviaul words are not separated by white space.

This function was introduced in Qt 4.4.

See also wordSpacing() and setLetterSpacing().

Upstream PySide2 reference signatures (binding differences may apply):

setWordSpacing(self, spacing: float) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#setWordSpacing

stretch

stretch() -> int

X.stretch() -> int

Supplemental documentation: Qt 5 reference:

int QFont::stretch() const

Returns the stretch factor for the font.

See also setStretch().

Upstream PySide2 reference signatures (binding differences may apply):

stretch(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#stretch

strikeOut

strikeOut() -> bool

X.strikeOut() -> bool

Supplemental documentation: Qt 5 reference:

bool QFont::strikeOut() const

Returns true if strikeout has been set; otherwise returns false.

See also setStrikeOut().

Upstream PySide2 reference signatures (binding differences may apply):

strikeOut(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#strikeOut

style

style() -> Any

X.style()

Supplemental documentation: Qt 5 reference:

QFont::Style QFont::style() const

Returns the style of the font.

See also setStyle().

Upstream PySide2 reference signatures (binding differences may apply):

style(self) -> PySide2.QtGui.QFont.Style

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#style

styleHint

styleHint() -> Any

X.styleHint()

Supplemental documentation: Qt 5 reference:

QFont::StyleHint QFont::styleHint() const

Returns the StyleHint.

The style hint affects the font matching algorithm. See QFont::StyleHint for the list of available hints.

See also setStyleHint(), QFont::StyleStrategy, and QFontInfo::styleHint().

Upstream PySide2 reference signatures (binding differences may apply):

styleHint(self) -> PySide2.QtGui.QFont.StyleHint

Source: https://doc.qt.io/archives/qt-5.15/qfont.html#styleHint