Obsolete Members for QFont

The following members of class QFont are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.

Public Functions

(obsolete) QFont(const QFont &font, QPaintDevice *pd)
(obsolete) QString lastResortFamily() const
(obsolete) QString lastResortFont() const
(obsolete) bool rawMode() const
(obsolete) QString rawName() const
(obsolete) void setRawMode(bool enable)
(obsolete) void setRawName(const QString &name)

Static Public Members

(obsolete) void removeSubstitution(const QString &familyName)

Member Function Documentation

QFont::QFont(const QFont &font, QPaintDevice *pd)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Constructs a font from font for use on the paint device pd.

QString QFont::lastResortFamily() const

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

This function is deprecated and is not in use by the font selection algorithm in Qt 5. It always returns "helvetica".

See also lastResortFont().

QString QFont::lastResortFont() const

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Deprecated function. Since Qt 5.0, this is not used by the font selection algorithm. For compatibility it remains in the API, but will always return the same value as lastResortFamily().

bool QFont::rawMode() const

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Returns true if raw mode is used for font name matching; otherwise returns false.

See also setRawMode().

QString QFont::rawName() const

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Returns the name of the font within the underlying window system.

On X11, this function will return an empty string.

Using the return value of this function is usually not portable.

See also setRawName().

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

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

This function is deprecated. Use removeSubstitutions() instead.

void QFont::setRawMode(bool enable)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

If enable is true, turns raw mode on; otherwise turns raw mode off. This function only has an effect under X11.

If raw mode is enabled, Qt will search for an X font with a complete font name matching the family name, ignoring all other values set for the QFont. If the font name matches several fonts, Qt will use the first font returned by X. QFontInfo cannot be used to fetch information about a QFont using raw mode (it will return the values set in the QFont for all parameters, including the family name).

Warning: Enabling raw mode has no effect since Qt 5.0.

See also rawMode().

void QFont::setRawName(const QString &name)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Sets a font by its system specific name.

A font set with setRawName() is still a full-featured QFont. It can be queried (for example with italic()) or modified (for example with setItalic()) and is therefore also suitable for rendering rich text.

If Qt's internal font database cannot resolve the raw name, the font becomes a raw font with name as its family.

See also rawName() and setFamily().