以下成員源於類 QFontInfo 被棄用。 提供它們是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它們。
(棄用)
int
|
legacyWeight () const |
[deprecated]
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 .