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