QLocale Class
The QLocale class converts between numbers and their string representations in various languages. More...
Header: | #include <QLocale> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
qmake: | QT += core |
Note: All functions in this class are reentrant.
Public Types
enum | Country { AnyCountry, AnyTerritory, Afghanistan, AlandIslands, Albania, …, Zimbabwe } |
flags | DataSizeFormats |
enum | FloatingPointPrecisionOption { FloatingPointShortest } |
enum | FormatType { LongFormat, ShortFormat, NarrowFormat } |
enum | Language { AnyLanguage, C, Abkhazian, Afan, Afar, …, Zulu } |
enum | LanguageCodeType { ISO639Part1, ISO639Part2B, ISO639Part2T, ISO639Part3, LegacyLanguageCode, …, AnyLanguageCode } |
flags | LanguageCodeTypes |
enum | MeasurementSystem { MetricSystem, ImperialUSSystem, ImperialUKSystem, ImperialSystem } |
enum | NumberOption { DefaultNumberOptions, OmitGroupSeparator, RejectGroupSeparator, OmitLeadingZeroInExponent, RejectLeadingZeroInExponent, …, RejectTrailingZeroesAfterDot } |
flags | NumberOptions |
enum | QuotationStyle { StandardQuotation, AlternateQuotation } |
enum | Script { AnyScript, AdlamScript, AhomScript, AnatolianHieroglyphsScript, ArabicScript, …, YiScript } |
Territory |
Public Functions
QString | toCurrencyString(short value, const QString &symbol = QString()) const |
QString | toCurrencyString(ushort value, const QString &symbol = QString()) const |
QString | toCurrencyString(int value, const QString &symbol = QString()) const |
QString | toCurrencyString(uint value, const QString &symbol = QString()) const |
QString | toString(long i) const |
QString | toString(ulong i) const |
QString | toString(short i) const |
QString | toString(ushort i) const |
QString | toString(int i) const |
QString | toString(uint i) const |
QString | toString(float f, char format = 'g', int precision = 6) const |
Related Non-Members
bool | operator!=(const QLocale &lhs, const QLocale &rhs) |
bool | operator==(const QLocale &lhs, const QLocale &rhs) |
Detailed Description
QLocale is constructed for a specified language, optional script and territory. It offers various facilities for formatting data as text, localized appropriately, and for reading data out of localized text.
Example:
QLocale egyptian(QLocale::Arabic, QLocale::Egypt); QString s1 = egyptian.toString(1.571429E+07, 'e'); QString s2 = egyptian.toString(10); double d = egyptian.toDouble(s1); int i = egyptian.toInt(s2);
QLocale supports the concept of a default locale, which is determined from the system's locale settings at application startup. The default locale can be changed by calling the static member setDefault(). Setting the default locale has the following effects:
- If a QLocale object is constructed with the default constructor, it will use the default locale's settings.
- QString::arg() uses the default locale to format a number when its position specifier in the format string contains an 'L', e.g. "%L1".
The following example illustrates how to use QLocale directly:
bool ok; double d; QLocale::setDefault(QLocale::C); // uses '.' as a decimal point QLocale cLocale; // default-constructed C locale d = cLocale.toDouble("1234,56", &ok); // ok == false, d == 0 d = cLocale.toDouble("1234.56", &ok); // ok == true, d == 1234.56 QLocale::setDefault(QLocale::German); // uses ',' as a decimal point QLocale german; // default-constructed German locale d = german.toDouble("1234,56", &ok); // ok == true, d == 1234.56 d = german.toDouble("1234.56", &ok); // ok == false, d == 0 QLocale::setDefault(QLocale::English); // Default locale now uses ',' as a group separator. QString str = QString("%1 %L2 %L3").arg(12345).arg(12345).arg(12345, 0, 16); // str == "12345 12,345 3039"
An alternative method for constructing a QLocale object is by specifying the locale name.
QLocale korean("ko"); QLocale swiss("de_CH");
This constructor reads the language, script and/or territory from the given name, accepting either uderscore or dash as separator (and ignoring any trailing .codeset
or @variant
suffix).
Note: For the current keyboard input locale take a look at QInputMethod::locale().
QLocale's data is based on Common Locale Data Repository v41.
Matching combinations of language, script and territory
QLocale has data, derived from CLDR, for many combinations of language, script and territory, but not all. If it is constructed with all three of these key values specified (treating AnyLanguage
, AnyScript
or AnyTerritory
as unspecified) and QLocale has data for the given combination, this data is used. Otherwise, QLocale does its best to find a sensible combination of language, script and territory, for which it does have data, that matches those that were specified.
The CLDR provides tables of likely combinations, which are used to fill in any unspecified key or keys; if QLocale has data for the result of such a likely combination, that is used. If no language is specified, and none can be determined from script and territory, or if QLocale has no data for the language, the "C" locale (when reading the keys from a string) or default locale (otherwise) is used.
When QLocale has no data for the keys specified, with likely keys filled in where unspecified, but does have data for the resulting language, a fall-back is sought, based on ignoring either territory, script or both (in that order). This results in a QLocale which may not match what was asked for, but provides localization that's as suitable as the available data permits, for the keys specified.
Use language(), script() and territory() to determine the actual keys used.
See also QString::arg() and QInputMethod::locale().
Member Type Documentation
enum QLocale::Country
This enumerated type is used to identify a territory.
An individual territory may be a province of a country, a country (by far the most common case) or a larger geographic entity, to which some localization details are specific.
Constant | Value | Description |
---|---|---|
QLocale::AnyCountry | AnyTerritory | Osbolete alias for AnyTerritory |
QLocale::AnyTerritory (since Qt 6.2) | 0 | |
QLocale::Afghanistan | 1 | |
QLocale::AlandIslands | 2 | |
QLocale::Albania | 3 | |
QLocale::Algeria | 4 | |
QLocale::AmericanSamoa | 5 | |
QLocale::Andorra | 6 | |
QLocale::Angola | 7 | |
QLocale::Anguilla | 8 | |
QLocale::Antarctica | 9 | |
QLocale::AntiguaAndBarbuda | 10 | |
QLocale::Argentina | 11 | |
QLocale::Armenia | 12 | |
QLocale::Aruba | 13 | |
QLocale::AscensionIsland | 14 | |
QLocale::Australia | 15 | |
QLocale::Austria | 16 | |
QLocale::Azerbaijan | 17 | |
QLocale::Bahamas | 18 | |
QLocale::Bahrain | 19 | |
QLocale::Bangladesh | 20 | |
QLocale::Barbados | 21 | |
QLocale::Belarus | 22 | |
QLocale::Belgium | 23 | |
QLocale::Belize | 24 | |
QLocale::Benin | 25 | |
QLocale::Bermuda | 26 | |
QLocale::Bhutan | 27 | |
QLocale::Bolivia | 28 | |
QLocale::Bonaire | CaribbeanNetherlands | |
QLocale::BosniaAndHerzegowina | BosniaAndHerzegovina | Obsolete, use BosniaAndHerzegovina instead |
QLocale::BosniaAndHerzegovina (since Qt 6.0) | 29 | |
QLocale::Botswana | 30 | |
QLocale::BouvetIsland | 31 | |
QLocale::Brazil | 32 | |
QLocale::BritishIndianOceanTerritory | 33 | |
QLocale::BritishVirginIslands | 34 | |
QLocale::Brunei | 35 | |
QLocale::Bulgaria | 36 | |
QLocale::BurkinaFaso | 37 | |
QLocale::Burundi | 38 | |
QLocale::Cambodia | 39 | |
QLocale::Cameroon | 40 | |
QLocale::Canada | 41 | |
QLocale::CanaryIslands | 42 | |
QLocale::CaribbeanNetherlands | 44 | |
QLocale::CapeVerde | 43 | |
QLocale::CaymanIslands | 45 | |
QLocale::CentralAfricanRepublic | 46 | |
QLocale::CeutaAndMelilla | 47 | |
QLocale::Chad | 48 | |
QLocale::Chile | 49 | |
QLocale::China | 50 | |
QLocale::ChristmasIsland | 51 | |
QLocale::ClippertonIsland | 52 | |
QLocale::CocosIslands | 53 | |
QLocale::Colombia | 54 | |
QLocale::Comoros | 55 | |
QLocale::CongoBrazzaville | 56 | |
QLocale::CongoKinshasa | 57 | |
QLocale::CookIslands | 58 | |
QLocale::CostaRica | 59 | |
QLocale::Croatia | 60 | |
QLocale::Cuba | 61 | |
QLocale::Curacao (since Qt 6.0) | 62 | |
QLocale::CuraSao | Curacao | Obsolete, use Curacao instead |
QLocale::Cyprus | 63 | |
QLocale::Czechia (since Qt 6.0) | 64 | |
QLocale::CzechRepublic | Czechia | Obsolete, use Czechia instead |
QLocale::DemocraticRepublicOfCongo | CongoKinshasa | Obsolete, use CongoKinshasa instead |
QLocale::DemocraticRepublicOfKorea | NorthKorea | Obsolete, use NorthKorea instead |
QLocale::Denmark | 65 | |
QLocale::DiegoGarcia | 66 | |
QLocale::Djibouti | 67 | |
QLocale::Dominica | 68 | |
QLocale::DominicanRepublic | 69 | |
QLocale::EastTimor | TimorLeste | |
QLocale::Ecuador | 70 | |
QLocale::Egypt | 71 | |
QLocale::ElSalvador | 72 | |
QLocale::EquatorialGuinea | 73 | |
QLocale::Eritrea | 74 | |
QLocale::Estonia | 75 | |
QLocale::Eswatini | 76 | |
QLocale::Ethiopia | 77 | |
QLocale::EuropeanUnion (since Qt 5.7) | 79 | |
QLocale::Europe (since Qt 5.12) | 78 | |
QLocale::FalklandIslands | 80 | |
QLocale::FaroeIslands | 81 | |
QLocale::Fiji | 82 | |
QLocale::Finland | 83 | |
QLocale::France | 84 | |
QLocale::FrenchGuiana | 85 | |
QLocale::FrenchPolynesia | 86 | |
QLocale::FrenchSouthernTerritories | 87 | |
QLocale::Gabon | 88 | |
QLocale::Gambia | 89 | |
QLocale::Georgia | 90 | |
QLocale::Germany | 91 | |
QLocale::Ghana | 92 | |
QLocale::Gibraltar | 93 | |
QLocale::Greece | 94 | |
QLocale::Greenland | 95 | |
QLocale::Grenada | 96 | |
QLocale::Guadeloupe | 97 | |
QLocale::Guam | 98 | |
QLocale::Guatemala | 99 | |
QLocale::Guernsey | 100 | |
QLocale::Guinea | 102 | |
QLocale::GuineaBissau | 101 | |
QLocale::Guyana | 103 | |
QLocale::Haiti | 104 | |
QLocale::HeardAndMcDonaldIslands | 105 | |
QLocale::Honduras | 106 | |
QLocale::HongKong | 107 | |
QLocale::Hungary | 108 | |
QLocale::Iceland | 109 | |
QLocale::India | 110 | |
QLocale::Indonesia | 111 | |
QLocale::Iran | 112 | |
QLocale::Iraq | 113 | |
QLocale::Ireland | 114 | |
QLocale::IsleOfMan | 115 | |
QLocale::Israel | 116 | |
QLocale::Italy | 117 | |
QLocale::IvoryCoast | 118 | |
QLocale::Jamaica | 119 | |
QLocale::Japan | 120 | |
QLocale::Jersey | 121 | |
QLocale::Jordan | 122 | |
QLocale::Kazakhstan | 123 | |
QLocale::Kenya | 124 | |
QLocale::Kiribati | 125 | |
QLocale::Kosovo (since Qt 5.2) | 126 | |
QLocale::Kuwait | 127 | |
QLocale::Kyrgyzstan | 128 | |
QLocale::Laos | 129 | |
QLocale::LatinAmerica | 130 | |
QLocale::LatinAmericaAndTheCaribbean | LatinAmerica | Obsolete, use LatinAmerica instead |
QLocale::Latvia | 131 | |
QLocale::Lebanon | 132 | |
QLocale::Lesotho | 133 | |
QLocale::Liberia | 134 | |
QLocale::Libya | 135 | |
QLocale::Liechtenstein | 136 | |
QLocale::Lithuania | 137 | |
QLocale::Luxembourg | 138 | |
QLocale::Macao | 139 | |
QLocale::Macau | Macao | |
QLocale::Macedonia | 140 | |
QLocale::Madagascar | 141 | |
QLocale::Malawi | 142 | |
QLocale::Malaysia | 143 | |
QLocale::Maldives | 144 | |
QLocale::Mali | 145 | |
QLocale::Malta | 146 | |
QLocale::MarshallIslands | 147 | |
QLocale::Martinique | 148 | |
QLocale::Mauritania | 149 | |
QLocale::Mauritius | 150 | |
QLocale::Mayotte | 151 | |
QLocale::Mexico | 152 | |
QLocale::Micronesia | 153 | |
QLocale::Moldova | 154 | |
QLocale::Monaco | 155 | |
QLocale::Mongolia | 156 | |
QLocale::Montenegro | 157 | |
QLocale::Montserrat | 158 | |
QLocale::Morocco | 159 | |
QLocale::Mozambique | 160 | |
QLocale::Myanmar | 161 | |
QLocale::Namibia | 162 | |
QLocale::NauruCountry | NauruTerritory | Osbolete alias for NauruTerritory |
QLocale::NauruTerritory (since Qt 6.2) | 163 | |
QLocale::Nepal | 164 | |
QLocale::Netherlands | 165 | |
QLocale::NewCaledonia | 166 | |
QLocale::NewZealand | 167 | |
QLocale::Nicaragua | 168 | |
QLocale::Niger | 170 | |
QLocale::Nigeria | 169 | |
QLocale::Niue | 171 | |
QLocale::NorfolkIsland | 172 | |
QLocale::NorthernMarianaIslands | 173 | |
QLocale::NorthKorea | 174 | |
QLocale::Norway | 175 | |
QLocale::Oman | 176 | |
QLocale::OutlyingOceania (since Qt 5.7) | 177 | |
QLocale::Pakistan | 178 | |
QLocale::Palau | 179 | |
QLocale::PalestinianTerritories | 180 | |
QLocale::Panama | 181 | |
QLocale::PapuaNewGuinea | 182 | |
QLocale::Paraguay | 183 | |
QLocale::PeoplesRepublicOfCongo | CongoBrazzaville | Obsolete, use CongoBrazzaville instead |
QLocale::Peru | 184 | |
QLocale::Philippines | 185 | |
QLocale::Pitcairn | 186 | |
QLocale::Poland | 187 | |
QLocale::Portugal | 188 | |
QLocale::PuertoRico | 189 | |
QLocale::Qatar | 190 | |
QLocale::RepublicOfKorea | SouthKorea | Obsolete, use SouthKorea instead |
QLocale::Reunion | 191 | |
QLocale::Romania | 192 | |
QLocale::RussianFederation | Russia | |
QLocale::Russia | 193 | |
QLocale::Rwanda | 194 | |
QLocale::SaintBarthelemy | 195 | |
QLocale::SaintHelena | 196 | |
QLocale::SaintKittsAndNevis | 197 | |
QLocale::SaintLucia | 198 | |
QLocale::SaintMartin | 199 | |
QLocale::SaintPierreAndMiquelon | 200 | |
QLocale::SaintVincentAndGrenadines | 201 | |
QLocale::SaintVincentAndTheGrenadines | SaintVincentAndGrenadines | |
QLocale::Samoa | 202 | |
QLocale::SanMarino | 203 | |
QLocale::SaoTomeAndPrincipe | 204 | |
QLocale::SaudiArabia | 205 | |
QLocale::Senegal | 206 | |
QLocale::Serbia | 207 | |
QLocale::Seychelles | 208 | |
QLocale::SierraLeone | 209 | |
QLocale::Singapore | 210 | |
QLocale::SintMaarten | 211 | |
QLocale::Slovakia | 212 | |
QLocale::Slovenia | 213 | |
QLocale::SolomonIslands | 214 | |
QLocale::Somalia | 215 | |
QLocale::SouthAfrica | 216 | |
QLocale::SouthGeorgiaAndSouthSandwichIslands | 217 | |
QLocale::SouthGeorgiaAndTheSouthSandwichIslands | SouthGeorgiaAndSouthSandwichIslands | |
QLocale::SouthKorea | 218 | |
QLocale::SouthSudan | 219 | |
QLocale::Spain | 220 | |
QLocale::SriLanka | 221 | |
QLocale::Sudan | 222 | |
QLocale::Suriname | 223 | |
QLocale::SvalbardAndJanMayen | 224 | |
QLocale::SvalbardAndJanMayenIslands | SvalbardAndJanMayen | |
QLocale::Swaziland | Eswatini | |
QLocale::Sweden | 225 | |
QLocale::Switzerland | 226 | |
QLocale::Syria | 227 | |
QLocale::SyrianArabRepublic | Syria | Obsolete, use Syria instead |
QLocale::Taiwan | 228 | |
QLocale::Tajikistan | 229 | |
QLocale::Tanzania | 230 | |
QLocale::Thailand | 231 | |
QLocale::TimorLeste | 232 | |
QLocale::Togo | 233 | |
QLocale::TokelauCountry | TokelauTerritory | Osbolete alias for TokelauTerritory |
QLocale::TokelauTerritory (since Qt 6.2) | 234 | |
QLocale::Tonga | 235 | |
QLocale::TrinidadAndTobago | 236 | |
QLocale::TristanDaCunha | 237 | |
QLocale::Tunisia | 238 | |
QLocale::Turkey | 239 | |
QLocale::Turkmenistan | 240 | |
QLocale::TurksAndCaicosIslands | 241 | |
QLocale::TuvaluCountry | TuvaluTerritory | Osbolete alias for TuvaluTerritory |
QLocale::TuvaluTerritory (since Qt 6.2) | 242 | |
QLocale::Uganda | 243 | |
QLocale::Ukraine | 244 | |
QLocale::UnitedArabEmirates | 245 | |
QLocale::UnitedKingdom | 246 | |
QLocale::UnitedStates | 248 | |
QLocale::UnitedStatesOutlyingIslands | 247 | |
QLocale::UnitedStatesMinorOutlyingIslands | UnitedStatesOutlyingIslands | |
QLocale::UnitedStatesVirginIslands | 249 | |
QLocale::Uruguay | 250 | |
QLocale::Uzbekistan | 251 | |
QLocale::Vanuatu | 252 | |
QLocale::VaticanCity | 253 | |
QLocale::VaticanCityState | VaticanCity | |
QLocale::Venezuela | 254 | |
QLocale::Vietnam | 255 | |
QLocale::WallisAndFutuna | 256 | |
QLocale::WallisAndFutunaIslands | WallisAndFutuna | |
QLocale::WesternSahara | 257 | |
QLocale::World (since Qt 5.12) | 258 | |
QLocale::Yemen | 259 | |
QLocale::Zambia | 260 | |
QLocale::Zimbabwe | 261 |
Note: Use the Territory alias for this enumeration where possible. The Country enum shall be renamed to Territory at a later release.
See also territory(), territoryToString(), codeToTerritory(), and territoryToCode().
[since 5.7]
enum QLocale::FloatingPointPrecisionOption
This enum defines a constant that can be given as precision to QString::number(), QByteArray::number(), and QLocale::toString() when converting floats or doubles, in order to express a variable number of digits as precision.
Constant | Value | Description |
---|---|---|
QLocale::FloatingPointShortest | -128 | The conversion algorithm will try to find the shortest accurate representation for the given number. "Accurate" means that you get the exact same number back from an inverse conversion on the generated string representation. In particular, trailing zeros are omitted (from the mantissa, in exponent formats). |
This enum was introduced or modified in Qt 5.7.
See also toString(), QString::number(), and QByteArray::number().
enum QLocale::FormatType
This enum describes the different formats that can be used when converting QDate, QTime, and QDateTime objects, as well as months and days, to strings specific to the locale.
Constant | Value | Description |
---|---|---|
QLocale::LongFormat | 0 | Longer format. |
QLocale::ShortFormat | 1 | Shorter format. |
QLocale::NarrowFormat | 2 | A special version for use when space is very limited. |
Note: NarrowFormat
might contain the same text for different months and days. It can even be an empty string if the locale doesn't support narrow names, so you should avoid using it for date formatting. Also, for the system locale this format is the same as ShortFormat
.
See also dateFormat(), timeFormat(), dateTimeFormat(), monthName(), standaloneMonthName(), dayName(), standaloneDayName(), toDate(), toTime(), and toDateTime().
enum QLocale::Language
This enumerated type is used to specify a language.
Constant | Value | Description |
---|---|---|
QLocale::AnyLanguage | 0 | |
QLocale::C | 1 | A simplified English locale; see QLocale::c() |
QLocale::Abkhazian | 2 | |
QLocale::Afan | Oromo | Obsolete, please use Oromo |
QLocale::Afar | 3 | |
QLocale::Afrikaans | 4 | |
QLocale::Aghem | 5 | |
QLocale::Akan | 6 | |
QLocale::Akkadian (since Qt 5.1) | 7 | |
QLocale::Akoose (since Qt 5.3) | 8 | |
QLocale::Albanian | 9 | |
QLocale::AmericanSignLanguage (since Qt 5.7) | 10 | |
QLocale::Amharic | 11 | |
QLocale::AncientEgyptian (since Qt 5.1) | 12 | |
QLocale::AncientGreek (since Qt 5.1) | 13 | |
QLocale::Arabic | 14 | |
QLocale::Aragonese (since Qt 5.1) | 15 | |
QLocale::Aramaic (since Qt 5.1) | 16 | |
QLocale::Armenian | 17 | |
QLocale::Assamese | 18 | |
QLocale::Asturian | 19 | |
QLocale::Asu | 20 | |
QLocale::Atsam | 21 | |
QLocale::Avaric | 22 | |
QLocale::Avestan | 23 | |
QLocale::Aymara | 24 | |
QLocale::Azerbaijani | 25 | |
QLocale::Bafia | 26 | |
QLocale::Balinese (since Qt 5.1) | 27 | |
QLocale::Bambara | 28 | |
QLocale::Bamun (since Qt 5.1) | 29 | |
QLocale::Bangla (since Qt 6.0) | 30 | |
QLocale::Basaa | 31 | |
QLocale::Bashkir | 32 | |
QLocale::Basque | 33 | |
QLocale::BatakToba (since Qt 5.1) | 34 | |
QLocale::Belarusian | 35 | |
QLocale::Bemba | 36 | |
QLocale::Bena | 37 | |
QLocale::Bengali | Bangla | Obsolete, please use Bangla |
QLocale::Bhojpuri (since Qt 5.7) | 38 | |
QLocale::Bhutani | Dzongkha | Obsolete, please use Dzongkha |
QLocale::Bislama | 39 | |
QLocale::Blin | 40 | |
QLocale::Bodo | 41 | |
QLocale::Bosnian | 42 | |
QLocale::Breton | 43 | |
QLocale::Buginese (since Qt 5.1) | 44 | |
QLocale::Bulgarian | 45 | |
QLocale::Burmese | 46 | |
QLocale::Byelorussian | Belarusian | Obsolete, please use Belarusian |
QLocale::Cambodian | Khmer | Obsolete, please use Khmer |
QLocale::Cantonese (since Qt 5.7) | 47 | |
QLocale::Catalan | 48 | |
QLocale::Cebuano (since Qt 5.14) | 49 | |
QLocale::CentralAtlasTamazight (since Qt 6.0) | 50 | |
QLocale::CentralKurdish (since Qt 5.5) | 51 | |
QLocale::CentralMoroccoTamazight | CentralAtlasTamazight | Obsolete, please use CentralAtlasTamazight |
QLocale::Chakma (since Qt 5.1) | 52 | |
QLocale::Chamorro | 53 | |
QLocale::Chechen | 54 | |
QLocale::Cherokee | 55 | |
QLocale::Chewa | Nyanja | Obsolete, please use Nyanja |
QLocale::Chickasaw (since Qt 5.14) | 56 | |
QLocale::Chiga | 57 | |
QLocale::Chinese | 58 | (Mandarin) |
QLocale::Church | 59 | |
QLocale::Chuvash | 60 | |
QLocale::Colognian | 61 | |
QLocale::Coptic (since Qt 5.1) | 62 | |
QLocale::Cornish | 63 | |
QLocale::Corsican | 64 | |
QLocale::Cree | 65 | |
QLocale::Croatian | 66 | |
QLocale::Czech | 67 | |
QLocale::Danish | 68 | |
QLocale::Divehi | 69 | |
QLocale::Dogri (since Qt 5.1) | 70 | |
QLocale::Duala | 71 | |
QLocale::Dutch | 72 | |
QLocale::Dzongkha | 73 | |
QLocale::Embu | 74 | |
QLocale::English | 75 | |
QLocale::Erzya (since Qt 5.14) | 76 | |
QLocale::Esperanto | 77 | |
QLocale::Estonian | 78 | |
QLocale::Ewe | 79 | |
QLocale::Ewondo | 80 | |
QLocale::Faroese | 81 | |
QLocale::Fijian | 82 | |
QLocale::Filipino | 83 | |
QLocale::Finnish | 84 | |
QLocale::French | 85 | |
QLocale::Frisian | WesternFrisian | same as WesternFrisian |
QLocale::Friulian | 86 | |
QLocale::Fulah | 87 | |
QLocale::Ga | 89 | |
QLocale::Gaelic | 88 | |
QLocale::Galician | 90 | |
QLocale::Ganda | 91 | |
QLocale::Geez | 92 | |
QLocale::Georgian | 93 | |
QLocale::German | 94 | |
QLocale::Gothic (since Qt 5.1) | 95 | |
QLocale::Greek | 96 | |
QLocale::Greenlandic | Kalaallisut | Obsolete, please use Kalaallisut |
QLocale::Guarani | 97 | |
QLocale::Gujarati | 98 | |
QLocale::Gusii | 99 | |
QLocale::Haitian | 100 | |
QLocale::Hausa | 101 | |
QLocale::Hawaiian | 102 | |
QLocale::Hebrew | 103 | |
QLocale::Herero | 104 | |
QLocale::Hindi | 105 | |
QLocale::HiriMotu | 106 | |
QLocale::Hungarian | 107 | |
QLocale::Icelandic | 108 | |
QLocale::Ido (since Qt 5.12) | 109 | |
QLocale::Igbo | 110 | |
QLocale::InariSami (since Qt 5.5) | 111 | |
QLocale::Indonesian | 112 | |
QLocale::Ingush (since Qt 5.1) | 113 | |
QLocale::Interlingua | 114 | |
QLocale::Interlingue | 115 | |
QLocale::Inuktitut | 116 | |
QLocale::Inupiak | Inupiaq | Obsolete, please use Inupiaq |
QLocale::Inupiaq (since Qt 6.0) | 117 | |
QLocale::Irish | 118 | |
QLocale::Italian | 119 | |
QLocale::Japanese | 120 | |
QLocale::Javanese | 121 | |
QLocale::Jju | 122 | |
QLocale::JolaFonyi | 123 | |
QLocale::Kabuverdianu | 124 | |
QLocale::Kabyle | 125 | |
QLocale::Kaingang (since Qt 6.3) | 328 | |
QLocale::Kako | 126 | |
QLocale::Kalaallisut (since Qt 6.0) | 127 | |
QLocale::Kalenjin | 128 | |
QLocale::Kamba | 129 | |
QLocale::Kannada | 130 | |
QLocale::Kanuri | 131 | |
QLocale::Kashmiri | 132 | |
QLocale::Kazakh | 133 | |
QLocale::Kenyang (since Qt 5.5) | 134 | |
QLocale::Khmer | 135 | |
QLocale::Kiche (since Qt 5.5) | 136 | |
QLocale::Kikuyu | 137 | |
QLocale::Kinyarwanda | 138 | |
QLocale::Kirghiz | Kyrgyz | Obsolete, please use Kyrgyz |
QLocale::Komi | 139 | |
QLocale::Kongo | 140 | |
QLocale::Konkani | 141 | |
QLocale::Korean | 142 | |
QLocale::Koro | 143 | |
QLocale::KoyraboroSenni | 144 | |
QLocale::KoyraChiini | 145 | |
QLocale::Kpelle | 146 | |
QLocale::Kuanyama (since Qt 6.0) | 147 | |
QLocale::Kurdish | 148 | |
QLocale::Kurundi | Rundi | Obsolete, please use Rundi |
QLocale::Kwanyama | Kuanyama | Obsolete, please use Kuanyama |
QLocale::Kwasio | 149 | |
QLocale::Kyrgyz (since Qt 6.0) | 150 | |
QLocale::Lakota (since Qt 5.3) | 151 | |
QLocale::Langi | 152 | |
QLocale::Lao | 153 | |
QLocale::Latin | 154 | |
QLocale::Latvian | 155 | |
QLocale::Lezghian (since Qt 5.5) | 156 | |
QLocale::Limburgish | 157 | |
QLocale::Lingala | 158 | |
QLocale::LiteraryChinese (since Qt 5.7) | 159 | |
QLocale::Lithuanian | 160 | |
QLocale::Lojban (since Qt 5.12) | 161 | |
QLocale::LowerSorbian (since Qt 5.5) | 162 | |
QLocale::LowGerman | 163 | |
QLocale::LubaKatanga | 164 | |
QLocale::LuleSami (since Qt 5.5) | 165 | |
QLocale::Luo | 166 | |
QLocale::Luxembourgish | 167 | |
QLocale::Luyia | 168 | |
QLocale::Macedonian | 169 | |
QLocale::Machame | 170 | |
QLocale::Maithili (since Qt 5.5) | 171 | |
QLocale::MakhuwaMeetto | 172 | |
QLocale::Makonde | 173 | |
QLocale::Malagasy | 174 | |
QLocale::Malay | 176 | |
QLocale::Malayalam | 175 | |
QLocale::Maltese | 177 | |
QLocale::Mandingo (since Qt 5.1) | 178 | |
QLocale::Manipuri (since Qt 5.1) | 179 | |
QLocale::Manx | 180 | |
QLocale::Maori | 181 | |
QLocale::Mapuche (since Qt 5.5) | 182 | |
QLocale::Marathi | 183 | |
QLocale::Marshallese | 184 | |
QLocale::Masai | 185 | |
QLocale::Mazanderani (since Qt 5.7) | 186 | |
QLocale::Mende (since Qt 5.5) | 187 | |
QLocale::Meru | 188 | |
QLocale::Meta | 189 | |
QLocale::Mohawk (since Qt 5.5) | 190 | |
QLocale::Mongolian | 191 | |
QLocale::Morisyen | 192 | |
QLocale::Mundang | 193 | |
QLocale::Muscogee (since Qt 5.14) | 194 | |
QLocale::Nama | 195 | |
QLocale::NauruLanguage | 196 | |
QLocale::Navaho | Navajo | Obsolete, please use Navajo |
QLocale::Navajo (since Qt 6.0) | 197 | |
QLocale::Ndonga | 198 | |
QLocale::Nepali | 199 | |
QLocale::Newari (since Qt 5.7) | 200 | |
QLocale::Ngiemboon | 201 | |
QLocale::Nheengatu (since Qt 6.3) | 329 | |
QLocale::NigerianPidgin (since Qt 6.0) | 203 | |
QLocale::Ngomba | 202 | |
QLocale::Nko (since Qt 5.5) | 204 | |
QLocale::NorthernLuri (since Qt 5.7) | 205 | |
QLocale::NorthernSami | 206 | |
QLocale::NorthernSotho | 207 | |
QLocale::NorthNdebele | 208 | |
QLocale::NorwegianBokmal | 209 | |
QLocale::NorwegianNynorsk | 210 | |
QLocale::Nuer | 211 | |
QLocale::Nyanja | 212 | |
QLocale::Nyankole | 213 | |
QLocale::Occitan | 214 | |
QLocale::Odia (since Qt 6.0) | 215 | |
QLocale::Ojibwa | 216 | |
QLocale::OldIrish (since Qt 5.1) | 217 | |
QLocale::OldNorse (since Qt 5.1) | 218 | |
QLocale::OldPersian (since Qt 5.1) | 219 | |
QLocale::Oriya | Odia | Obsolete, please use Odia |
QLocale::Oromo | 220 | |
QLocale::Osage (since Qt 5.7) | 221 | |
QLocale::Ossetic | 222 | |
QLocale::Pahlavi (since Qt 5.1) | 223 | |
QLocale::Palauan (since Qt 5.7) | 224 | |
QLocale::Pali | 225 | |
QLocale::Papiamento (since Qt 5.7) | 226 | |
QLocale::Pashto | 227 | |
QLocale::Persian | 228 | |
QLocale::Phoenician (since Qt 5.1) | 229 | |
QLocale::Polish | 230 | |
QLocale::Portuguese | 231 | |
QLocale::Prussian (since Qt 5.5) | 232 | |
QLocale::Punjabi | 233 | |
QLocale::Quechua | 234 | |
QLocale::RhaetoRomance | Romansh | Obsolete, please use Romansh |
QLocale::Romanian | 235 | |
QLocale::Romansh | 236 | |
QLocale::Rombo | 237 | |
QLocale::Rundi | 238 | |
QLocale::Russian | 239 | |
QLocale::Rwa | 240 | |
QLocale::Saho | 241 | |
QLocale::Sakha | 242 | |
QLocale::Samburu | 243 | |
QLocale::Samoan | 244 | |
QLocale::Sango | 245 | |
QLocale::Sangu | 246 | |
QLocale::Sanskrit | 247 | |
QLocale::Santali (since Qt 5.1) | 248 | |
QLocale::Sardinian | 249 | |
QLocale::Saurashtra (since Qt 5.1) | 250 | |
QLocale::Sena | 251 | |
QLocale::Serbian | 252 | |
QLocale::Shambala | 253 | |
QLocale::Shona | 254 | |
QLocale::SichuanYi | 255 | |
QLocale::Sicilian (since Qt 5.12) | 256 | |
QLocale::Sidamo | 257 | |
QLocale::Silesian (since Qt 5.14) | 258 | |
QLocale::Sindhi | 259 | |
QLocale::Sinhala | 260 | |
QLocale::SkoltSami (since Qt 5.5) | 261 | |
QLocale::Slovak | 262 | |
QLocale::Slovenian | 263 | |
QLocale::Soga | 264 | |
QLocale::Somali | 265 | |
QLocale::SouthernKurdish (since Qt 5.12) | 266 | |
QLocale::SouthernSami (since Qt 5.5) | 267 | |
QLocale::SouthernSotho | 268 | |
QLocale::SouthNdebele | 269 | |
QLocale::Spanish | 270 | |
QLocale::StandardMoroccanTamazight (since Qt 5.3) | 271 | |
QLocale::Sundanese | 272 | |
QLocale::Swahili | 273 | |
QLocale::Swati | 274 | |
QLocale::Swedish | 275 | |
QLocale::SwissGerman | 276 | |
QLocale::Syriac | 277 | |
QLocale::Tachelhit | 278 | |
QLocale::Tahitian | 279 | |
QLocale::TaiDam (since Qt 5.1) | 280 | |
QLocale::Taita | 281 | |
QLocale::Tajik | 282 | |
QLocale::Tamil | 283 | |
QLocale::Taroko | 284 | |
QLocale::Tasawaq | 285 | |
QLocale::Tatar | 286 | |
QLocale::Telugu | 287 | |
QLocale::Teso | 288 | |
QLocale::Thai | 289 | |
QLocale::Tibetan | 290 | |
QLocale::Tigre | 291 | |
QLocale::Tigrinya | 292 | |
QLocale::TokelauLanguage (since Qt 5.7) | 293 | |
QLocale::TokPisin (since Qt 5.7) | 294 | |
QLocale::Tongan | 295 | |
QLocale::Tsonga | 296 | |
QLocale::Tswana | 297 | |
QLocale::Turkish | 298 | |
QLocale::Turkmen | 299 | |
QLocale::TuvaluLanguage (since Qt 5.7) | 300 | |
QLocale::Tyap | 301 | |
QLocale::Ugaritic (since Qt 5.1) | 302 | |
QLocale::Uighur | Uyghur | Obsolete, please use Uyghur |
QLocale::Uigur | Uyghur | Obsolete, please use Uyghur |
QLocale::Ukrainian | 303 | |
QLocale::UpperSorbian (since Qt 5.5) | 304 | |
QLocale::Urdu | 305 | |
QLocale::Uyghur (since Qt 6.0) | 306 | |
QLocale::Uzbek | 307 | |
QLocale::Vai | 308 | |
QLocale::Venda | 309 | |
QLocale::Vietnamese | 310 | |
QLocale::Volapuk | 311 | |
QLocale::Vunjo | 312 | |
QLocale::Walamo | Wolaytta | Obsolete, please use Wolaytta |
QLocale::Walloon | 313 | |
QLocale::Walser | 314 | |
QLocale::Warlpiri (since Qt 5.5) | 315 | |
QLocale::Welsh | 316 | |
QLocale::WesternBalochi (since Qt 5.12) | 317 | |
QLocale::WesternFrisian | 318 | same as Frisian |
QLocale::Wolaytta (since Qt 6.0) | 319 | |
QLocale::Wolof | 320 | |
QLocale::Xhosa | 321 | |
QLocale::Yangben | 322 | |
QLocale::Yiddish | 323 | |
QLocale::Yoruba | 324 | |
QLocale::Zarma | 325 | |
QLocale::Zhuang | 326 | |
QLocale::Zulu | 327 |
See also language() and languageToString().
enum QLocale::LanguageCodeType
flags QLocale::LanguageCodeTypes
This enum defines language code types that can be used to restrict set of language codes considered by codeToLanguage
and languageToCode
.
Constant | Value | Description |
---|---|---|
QLocale::ISO639Part1 | 1 << 0 | ISO 639 Part 1 Alpha 2 code. |
QLocale::ISO639Part2B | 1 << 1 | ISO 639 Part 2 bibliographic Alpha 3 code. |
QLocale::ISO639Part2T | 1 << 2 | ISO 639 Part 2 terminological Alpha 3 code. |
QLocale::ISO639Part3 | 1 << 3 | ISO 639 Part 3 Alpha 3 code. |
QLocale::LegacyLanguageCode | 1 << 15 | Codes that are not part of the above set, but that were supported by Qt in the past. This value can only be used by codeToLanguage(). It is ignored when passed to languageToCode(). |
QLocale::ISO639Part2 | ISO639Part2B | ISO639Part2T | Any ISO 639 Part 2 code. |
QLocale::ISO639Alpha2 | ISO639Part1 | Any ISO-639 2-letter code. |
QLocale::ISO639Alpha3 | ISO639Part2 | ISO639Part3 | Any ISO-639 3-letter code. |
QLocale::ISO639 | ISO639Alpha2 | ISO639Alpha3 | Any ISO 639 code. |
QLocale::AnyLanguageCode | -1 | Specifies that any code can be used. |
The LanguageCodeTypes type is a typedef for QFlags<LanguageCodeType>. It stores an OR combination of LanguageCodeType values.
enum QLocale::MeasurementSystem
This enum defines which units are used for measurement.
Constant | Value | Description |
---|---|---|
QLocale::MetricSystem | 0 | This value indicates metric units, such as meters, centimeters and millimeters. |
QLocale::ImperialUSSystem | 1 | This value indicates imperial units, such as inches and miles as they are used in the United States. |
QLocale::ImperialUKSystem | 2 | This value indicates imperial units, such as inches and miles as they are used in the United Kingdom. |
QLocale::ImperialSystem | ImperialUSSystem | Provided for compatibility. Same as ImperialUSSystem |
enum QLocale::NumberOption
flags QLocale::NumberOptions
This enum defines a set of options for number-to-string and string-to-number conversions. They can be retrieved with numberOptions() and set with setNumberOptions().
Constant | Value | Description |
---|---|---|
QLocale::DefaultNumberOptions | 0x0 | This option represents the default behavior, with group separators, with one leading zero in single digit exponents, and without trailing zeroes after the decimal dot. |
QLocale::OmitGroupSeparator | 0x01 | If this option is set, the number-to-string functions will not insert group separators in their return values. The default is to insert group separators. |
QLocale::RejectGroupSeparator | 0x02 | If this option is set, the string-to-number functions will fail if they encounter group separators in their input. The default is to accept numbers containing correctly placed group separators. |
QLocale::OmitLeadingZeroInExponent | 0x04 | If this option is set, the number-to-string functions will not pad exponents with zeroes when printing floating point numbers in scientific notation. The default is to add one leading zero to single digit exponents. |
QLocale::RejectLeadingZeroInExponent | 0x08 | If this option is set, the string-to-number functions will fail if they encounter an exponent padded with zeroes when parsing a floating point number in scientific notation. The default is to accept such padding. |
QLocale::IncludeTrailingZeroesAfterDot | 0x10 | If this option is set, the number-to-string functions will pad numbers with zeroes to the requested precision in "g" or "most concise" mode, even if the number of significant digits is lower than the requested precision. The default is to omit trailing zeroes. |
QLocale::RejectTrailingZeroesAfterDot | 0x20 | If this option is set, the string-to-number functions will fail if they encounter trailing zeroes after the decimal dot when parsing a number in scientific or decimal representation. The default is to accept trailing zeroes. |
The NumberOptions type is a typedef for QFlags<NumberOption>. It stores an OR combination of NumberOption values.
See also setNumberOptions(), numberOptions(), and FloatingPointPrecisionOption.
enum QLocale::QuotationStyle
This enum defines a set of possible styles for locale specific quotation.
Constant | Value | Description |
---|---|---|
QLocale::StandardQuotation | 0 | If this option is set, the standard quotation marks will be used to quote strings. |
QLocale::AlternateQuotation | 1 | If this option is set, the alternate quotation marks will be used to quote strings. |
See also quoteString().
enum QLocale::Script
This enumerated type is used to specify a script.
Constant | Value | Description |
---|---|---|
QLocale::AnyScript | 0 | |
QLocale::AdlamScript (since Qt 5.7) | 1 | |
QLocale::AhomScript (since Qt 5.7) | 2 | |
QLocale::AnatolianHieroglyphsScript (since Qt 5.7) | 3 | |
QLocale::ArabicScript | 4 | |
QLocale::ArmenianScript | 5 | |
QLocale::AvestanScript (since Qt 5.1) | 6 | |
QLocale::BalineseScript (since Qt 5.1) | 7 | |
QLocale::BamumScript (since Qt 5.1) | 8 | |
QLocale::BanglaScript (since Qt 6.0) | 9 | |
QLocale::BassaVahScript (since Qt 5.5) | 10 | |
QLocale::BatakScript (since Qt 5.1) | 11 | |
QLocale::BengaliScript | BanglaScript | Obsolete, please use BanglaScript |
QLocale::BhaiksukiScript (since Qt 5.7) | 12 | |
QLocale::BopomofoScript (since Qt 5.1) | 13 | |
QLocale::BrahmiScript (since Qt 5.1) | 14 | |
QLocale::BrailleScript (since Qt 5.1) | 15 | |
QLocale::BugineseScript (since Qt 5.1) | 16 | |
QLocale::BuhidScript (since Qt 5.1) | 17 | |
QLocale::CanadianAboriginalScript (since Qt 5.1) | 18 | |
QLocale::CarianScript (since Qt 5.1) | 19 | |
QLocale::CaucasianAlbanianScript (since Qt 5.5) | 20 | |
QLocale::ChakmaScript (since Qt 5.1) | 21 | |
QLocale::ChamScript (since Qt 5.1) | 22 | |
QLocale::CherokeeScript | 23 | |
QLocale::CopticScript (since Qt 5.1) | 24 | |
QLocale::CuneiformScript (since Qt 5.1) | 25 | |
QLocale::CypriotScript (since Qt 5.1) | 26 | |
QLocale::CyrillicScript | 27 | |
QLocale::DeseretScript (since Qt 5.1) | 28 | |
QLocale::DevanagariScript | 29 | |
QLocale::DuployanScript (since Qt 5.5) | 30 | |
QLocale::EgyptianHieroglyphsScript (since Qt 5.1) | 31 | |
QLocale::ElbasanScript (since Qt 5.5) | 32 | |
QLocale::EthiopicScript | 33 | |
QLocale::FraserScript (since Qt 5.1) | 34 | |
QLocale::GeorgianScript | 35 | |
QLocale::GlagoliticScript (since Qt 5.1) | 36 | |
QLocale::GothicScript (since Qt 5.1) | 37 | |
QLocale::GranthaScript (since Qt 5.5) | 38 | |
QLocale::GreekScript | 39 | |
QLocale::GujaratiScript | 40 | |
QLocale::GurmukhiScript | 41 | |
QLocale::HangulScript (since Qt 5.1) | 42 | |
QLocale::HanScript (since Qt 5.1) | 43 | |
QLocale::HanunooScript (since Qt 5.1) | 44 | |
QLocale::HanWithBopomofoScript (since Qt 5.7) | 45 | |
QLocale::HatranScript (since Qt 5.7) | 46 | |
QLocale::HebrewScript | 47 | |
QLocale::HiraganaScript (since Qt 5.1) | 48 | |
QLocale::ImperialAramaicScript (since Qt 5.1) | 49 | |
QLocale::InscriptionalPahlaviScript (since Qt 5.1) | 50 | |
QLocale::InscriptionalParthianScript (since Qt 5.1) | 51 | |
QLocale::JamoScript (since Qt 5.7) | 52 | |
QLocale::JapaneseScript | 53 | |
QLocale::JavaneseScript (since Qt 5.1) | 54 | |
QLocale::KaithiScript (since Qt 5.1) | 55 | |
QLocale::KannadaScript | 56 | |
QLocale::KatakanaScript (since Qt 5.1) | 57 | |
QLocale::KayahLiScript (since Qt 5.1) | 58 | |
QLocale::KharoshthiScript (since Qt 5.1) | 59 | |
QLocale::KhmerScript (since Qt 5.1) | 60 | |
QLocale::KhojkiScript (since Qt 5.5) | 61 | |
QLocale::KhudawadiScript (since Qt 5.5) | 62 | |
QLocale::KoreanScript | 63 | |
QLocale::LannaScript (since Qt 5.1) | 64 | |
QLocale::LaoScript | 65 | |
QLocale::LatinScript | 66 | |
QLocale::LepchaScript (since Qt 5.1) | 67 | |
QLocale::LimbuScript (since Qt 5.1) | 68 | |
QLocale::LinearAScript (since Qt 5.5) | 69 | |
QLocale::LinearBScript (since Qt 5.1) | 70 | |
QLocale::LycianScript (since Qt 5.1) | 71 | |
QLocale::LydianScript (since Qt 5.1) | 72 | |
QLocale::MahajaniScript (since Qt 5.5) | 73 | |
QLocale::MalayalamScript | 74 | |
QLocale::MandaeanScript (since Qt 5.1) | 75 | |
QLocale::ManichaeanScript (since Qt 5.5) | 76 | |
QLocale::MarchenScript (since Qt 5.7) | 77 | |
QLocale::MeiteiMayekScript (since Qt 5.1) | 78 | |
QLocale::MendeScript (since Qt 6.0) | 79 | |
QLocale::MendeKikakuiScript | MendeScript | Obsolete, please use MendeScript |
QLocale::MeroiticCursiveScript (since Qt 5.1) | 80 | |
QLocale::MeroiticScript (since Qt 5.1) | 81 | |
QLocale::ModiScript (since Qt 5.5) | 82 | |
QLocale::MongolianScript | 83 | |
QLocale::MroScript (since Qt 5.5) | 84 | |
QLocale::MultaniScript (since Qt 5.7) | 85 | |
QLocale::MyanmarScript | 86 | |
QLocale::NabataeanScript (since Qt 5.5) | 87 | |
QLocale::NewaScript (since Qt 5.7) | 88 | |
QLocale::NewTaiLueScript (since Qt 5.1) | 89 | |
QLocale::NkoScript (since Qt 5.1) | 90 | |
QLocale::OghamScript (since Qt 5.1) | 92 | |
QLocale::OlChikiScript (since Qt 5.1) | 93 | |
QLocale::OldHungarianScript (since Qt 5.7) | 94 | |
QLocale::OldItalicScript (since Qt 5.1) | 95 | |
QLocale::OldNorthArabianScript (since Qt 5.5) | 96 | |
QLocale::OldPermicScript (since Qt 5.5) | 97 | |
QLocale::OldPersianScript (since Qt 5.1) | 98 | |
QLocale::OldSouthArabianScript (since Qt 5.1) | 99 | |
QLocale::OdiaScript (since Qt 6.0) | 91 | |
QLocale::OriyaScript | OdiaScript | Obsolete, please use OdiaScript |
QLocale::OrkhonScript (since Qt 5.1) | 100 | |
QLocale::OsageScript (since Qt 5.7) | 101 | |
QLocale::OsmanyaScript (since Qt 5.1) | 102 | |
QLocale::PahawhHmongScript (since Qt 5.5) | 103 | |
QLocale::PalmyreneScript (since Qt 5.5) | 104 | |
QLocale::PauCinHauScript (since Qt 5.5) | 105 | |
QLocale::PhagsPaScript (since Qt 5.1) | 106 | |
QLocale::PhoenicianScript (since Qt 5.1) | 107 | |
QLocale::PollardPhoneticScript (since Qt 5.1) | 108 | |
QLocale::PsalterPahlaviScript (since Qt 5.5) | 109 | |
QLocale::RejangScript (since Qt 5.1) | 110 | |
QLocale::RunicScript (since Qt 5.1) | 111 | |
QLocale::SamaritanScript (since Qt 5.1) | 112 | |
QLocale::SaurashtraScript (since Qt 5.1) | 113 | |
QLocale::SharadaScript (since Qt 5.1) | 114 | |
QLocale::ShavianScript (since Qt 5.1) | 115 | |
QLocale::SiddhamScript (since Qt 5.5) | 116 | |
QLocale::SignWritingScript (since Qt 5.7) | 117 | |
QLocale::SimplifiedChineseScript | SimplifiedHanScript | same as SimplifiedHanScript |
QLocale::SimplifiedHanScript | 118 | same as SimplifiedChineseScript |
QLocale::SinhalaScript | 119 | |
QLocale::SoraSompengScript (since Qt 5.1) | 120 | |
QLocale::SundaneseScript (since Qt 5.1) | 121 | |
QLocale::SylotiNagriScript (since Qt 5.1) | 122 | |
QLocale::SyriacScript | 123 | |
QLocale::TagalogScript (since Qt 5.1) | 124 | |
QLocale::TagbanwaScript (since Qt 5.1) | 125 | |
QLocale::TaiLeScript (since Qt 5.1) | 126 | |
QLocale::TaiVietScript (since Qt 5.1) | 127 | |
QLocale::TakriScript (since Qt 5.1) | 128 | |
QLocale::TamilScript | 129 | |
QLocale::TangutScript (since Qt 5.7) | 130 | |
QLocale::TeluguScript | 131 | |
QLocale::ThaanaScript | 132 | |
QLocale::ThaiScript | 133 | |
QLocale::TibetanScript | 134 | |
QLocale::TifinaghScript | 135 | |
QLocale::TirhutaScript (since Qt 5.5) | 136 | |
QLocale::TraditionalChineseScript | TraditionalHanScript | same as TraditionalHanScript |
QLocale::TraditionalHanScript | 137 | same as TraditionalChineseScript |
QLocale::UgariticScript (since Qt 5.1) | 138 | |
QLocale::VaiScript | 139 | |
QLocale::VarangKshitiScript (since Qt 5.5) | 140 | |
QLocale::YiScript | 141 |
See also script(), scriptToString(), and languageToString().
[alias]
QLocale::Territory
This enumeration type is an alias for Country, which shall be renamed to Territory at a future release.
See also territory() and territoryToString().
Member Function Documentation
QString QLocale::toCurrencyString(short value, const QString &symbol = QString()) const
This is an overloaded function.
QString QLocale::toCurrencyString(ushort value, const QString &symbol = QString()) const
This is an overloaded function.
QString QLocale::toCurrencyString(int value, const QString &symbol = QString()) const
This is an overloaded function.
QString QLocale::toCurrencyString(uint value, const QString &symbol = QString()) const
This is an overloaded function.
QString QLocale::toString(long i) const
This is an overloaded function.
See also toLong().
QString QLocale::toString(ulong i) const
This is an overloaded function.
See also toULong().
QString QLocale::toString(short i) const
This is an overloaded function.
See also toShort().
QString QLocale::toString(ushort i) const
This is an overloaded function.
See also toUShort().
QString QLocale::toString(int i) const
This is an overloaded function.
See also toInt().
QString QLocale::toString(uint i) const
This is an overloaded function.
See also toUInt().
QString QLocale::toString(float f, char format = 'g', int precision = 6) const
This is an overloaded function.
Returns a string representing the floating-point number f.
The format and precision have the same meanings as described in toString(double, char, int).
See also toFloat(), toDouble(), numberOptions(), exponential(), decimalPoint(), zeroDigit(), positiveSign(), percent(), toCurrencyString(), formattedDataSize(), and QLocale::FloatingPointPrecisionOption.
Related Non-Members
bool operator!=(const QLocale &lhs, const QLocale &rhs)
Returns true
if the two QLocale objects, lhs and rhs, differ; otherwise returns false
.
Note: The system locale is not equal to the QLocale object constructed from its language(), script() and territory(), even if the two agree in all data fields. Nor are two locales with different number options equal.
See also operator==() and setNumberOptions().
bool operator==(const QLocale &lhs, const QLocale &rhs)
Returns true
if the two QLocale objects, lhs and rhs, are the same; otherwise returns false
.
Note: The system locale is not equal to the QLocale object constructed from its language(), script() and territory(), even if the two agree in all data fields. Nor are two locales with different number options equal.
See also operator!=() and setNumberOptions().