Obsolete Members for QLocale
QLocale クラスの以下のメンバーは非推奨となっています。これらは、古いソースコードが動作し続けるように提供されているものです。新しいコードでの使用は強く推奨しません。
パブリック関数
(deprecated in 6.6) QLocale::Country | country() const |
(deprecated in 6.6) QString | nativeCountryName() const |
静的パブリックメンバー
(since 6.1, deprecated in 6.6) QLocale::Country | codeToCountry(QStringView countryCode) |
(deprecated in 6.6) QList<QLocale::Country> | countriesForLanguage(QLocale::Language language) |
(deprecated in 6.6) QString | countryToCode(QLocale::Country country) |
(deprecated in 6.6) QString | countryToString(QLocale::Country country) |
メンバー関数のドキュメント
[static noexcept, since 6.1, deprecated in 6.6] QLocale::Country QLocale::codeToCountry(QStringView countryCode)
この関数は 6.6 以降、非推奨となっています。新しいコードでの使用は強く推奨しません。
ISO 3166 規格で定義されている 2 文字または 3 桁の国コード (countryCode) に対応する `QLocale::Territory ` 列挙型を返します。
コードが無効であるか、認識されない場合は、QLocale::AnyTerritory が返されます。
代わりに `codeToTerritory` (`QStringView`) を使用してください。
この関数は Qt 6.1 で導入されました。
territoryToCode()、codeToLanguage()、およびcodeToScript()も参照してください 。
[static, deprecated in 6.6] QList<QLocale::Country> QLocale::countriesForLanguage(QLocale::Language language)
この関数はバージョン 6.6 以降、非推奨となっています。新しいコードでの使用は強くお勧めしません。
代わりに `matchingLocales()` を使用し、それぞれの `territory()` を参照してください。
Qtのロケールデータベースにlanguage のエントリがある国のリストを返します。結果が空のリストである場合、language はQtのロケールデータベースに存在しません。
matchingLocales()も参照してください 。
[deprecated in 6.6] QLocale::Country QLocale::country() const
この関数はバージョン 6.6 以降、非推奨となっています。新しいコードでの使用は強くお勧めしません。
代わりに `territory()` を使用してください。
このロケールの管轄区域を返します。
language()、script()、territoryToString()、およびbcp47Name()も参照してください 。
[static, deprecated in 6.6] QString QLocale::countryToCode(QLocale::Country country)
この関数はバージョン 6.6 以降、非推奨となっています。新しいコードでの使用は強く推奨しません。
代わりに `territoryToCode()` を使用してください。
ISO 3166 規格で定義されている、country に対応する 2 文字の地域コードを返します。
注: QLocale::AnyTerritory またはQLocale::AnyCountry の場合は 、空の文字列が返されます。
関連項目: codeToTerritory()、territory()、name()、bcp47Name()、languageToCode()、およびscriptToCode()。
[static, deprecated in 6.6] QString QLocale::countryToString(QLocale::Country country)
この関数はバージョン6.6以降、非推奨となっています。新しいコードでの使用は強くお勧めしません。
代わりにterritoryToString() を使用してください。
country の名前を含むQString を返します。
languageToString()、scriptToString()、territory()、およびbcp47Name()も参照してください 。
[deprecated in 6.6] QString QLocale::nativeCountryName() const
この関数はバージョン 6.6 以降、非推奨となっています。新しいコードでの使用は強く推奨しません。
代わりにnativeTerritoryName()を使用してください。
指定されたロケールに対応する地域の現地語名を返します。たとえば、Spanish/Spain ロケールの場合は "España" を返します。
nativeLanguageName() およびterritoryToString()も参照してください 。
© 2026 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.