Obsolete Members for QFont

以下成员源于类 QFont 已过时。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。

公共函数

(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 )

静态公共成员

(obsolete) void removeSubstitution (const QString & familyName )

成员函数文档编制

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

此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

构造字体从 font 为用于描绘设备 pd .

QString QFont:: lastResortFamily () const

此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

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

另请参阅 lastResortFont ().

QString QFont:: lastResortFont () const

此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

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

此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

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

另请参阅 setRawMode ().

QString QFont:: rawName () const

此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

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 .

另请参阅 setRawName ().

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

此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

This function is deprecated. Use removeSubstitutions () 代替。

void QFont:: setRawMode ( bool enable )

此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

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).

警告: Enabling raw mode has no effect since Qt 5.0.

另请参阅 rawMode ().

void QFont:: setRawName (const QString & name )

此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

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.

另请参阅 rawName () 和 setFamily ().