Obsolete Members for QFontInfo

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

公共函数

(弃用) int legacyWeight () const

成员函数文档编制

int QFontInfo:: legacyWeight () const

This function is deprecated. We strongly advise against using it in new code.

使用 weight () 代替。

Returns the weight of the font converted to the non-standard font weight scale used in Qt 5 and earlier versions.

Since Qt 6, the OpenType standard's font weight scale is used instead of a non-standard scale. This requires conversion from values that use the old scale. For convenience, this function may be used when porting from code which uses the old weight scale.

另请参阅 QFont::setWeight (), weight (),和 QFontInfo .