以下成员源于类 QFont 被弃用。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。
(deprecated (6.0))
int
|
legacyWeight () const |
(deprecated (6.0))
void
|
setLegacyWeight (int legacyWeight ) |
This function is deprecated since 6.0. 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.
另请参阅 setLegacyWeight (), setWeight (), weight (),和 QFontInfo .
This function is deprecated since 6.0. We strongly advise against using it in new code.
使用 setWeight () 代替。
将字体的精细设为 legacyWeight using the legacy font weight scale of Qt 5 and previous 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.
注意: 若 styleName () 有设置,此值可能被忽略对于选中字体。
另请参阅 legacyWeight (), setWeight (), weight (),和 QFontInfo .