Obsolete Members for QFont

クラスQFont の以下のメンバは非推奨である。これらは古いソース・コードの動作を維持するために提供されています。新しいコードでは使用しないことを強くお勧めします。

パブリック関数

(deprecated in 6.0) int legacyWeight() const
(deprecated in 6.0) void setLegacyWeight(int legacyWeight)

メンバ関数ドキュメント

[deprecated in 6.0] int QFont::legacyWeight() const

この関数は6.0から非推奨となった。新しいコードでは使用しないことを強く推奨する。

代わりにweight() を使用してください。

Qt 5 およびそれ以前のバージョンで使われていた非標準のフォントウェイトスケールに変換したフォントのウェイトを返します。

Qt 6 以降では、非標準の尺度の代わりに OpenType 標準のフォントウェイト尺度が使用されます。このため、古いスケールを使用する値からの変換が必要になります。便宜上、この関数は、古いウェイトスケールを使用するコードから移植する際に使用することができます。

setLegacyWeight(),setWeight(),weight(),QFontInfoも参照

[deprecated in 6.0] void QFont::setLegacyWeight(int legacyWeight)

この関数は6.0から非推奨となった。新しいコードでは使用しないことを強く推奨する。

代わりにsetWeight() を使用してください。

Qt 5 およびそれ以前のバージョンのレガシーフォントのウェイトスケールを使用して、フォントのウェイトをlegacyWeight に設定します。

Qt 6 以降では、非標準のスケールではなく、OpenType 標準のフォントウェイトスケールが使用されます。このため、古いスケールを使用した値からの変換が必要になります。便宜上、この関数は、古いウェイトスケールを使用するコードから移植する際に使用することができます。

注意: styleName() が設定されている場合、この値はフォント選択時に無視されることがあります。

legacyWeight()、setWeight()、weight()、QFontInfoも参照

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.