PythonQt.QtCore.QLocale · declarations 021
Back to PythonQt.QtCore.QLocale
positiveSign
positiveSign() -> str
X.positiveSign()
Supplemental documentation: Qt 5 reference:
QChar QLocale::positiveSign() const
Returns the positive sign character of this locale.
Note: This function shall change to return a QString instead of QChar in Qt6. Callers are encouraged to exploit the QString(QChar) constructor to convert early in preparation for this.
This function was introduced in Qt 4.5.
See also negativeSign() and toString().
Upstream PySide2 reference signatures (binding differences may apply):
positiveSign(self) -> str
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#positiveSign
quoteString
quoteString(str: str, style: Any) -> str
X.quoteString(str, style) -> str
Supplemental documentation: Qt 5 reference:
QString QLocale::quoteString(const QString \&str, QLocale::QuotationStyle style \= StandardQuotation) const
Returns str quoted according to the current locale using the given quotation style.
This function was introduced in Qt 4.8.
QString QLocale::quoteString(const QStringRef \&str, QLocale::QuotationStyle style \= StandardQuotation) const
This is an overloaded function.
This function was introduced in Qt 4.8.
Upstream PySide2 reference signatures (binding differences may apply):
quoteString(self, str: str, style: PySide2.QtCore.QLocale.QuotationStyle=...) -> str
quoteString(self, str: str, style: PySide2.QtCore.QLocale.QuotationStyle=...) -> str
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#quoteString
script
script() -> Any
X.script()
Supplemental documentation: Qt 5 reference:
QLocale::Script QLocale::script() const
Returns the script of this locale.
This function was introduced in Qt 4.8.
See also language(), country(), languageToString(), scriptToString(), and bcp47Name().
Upstream PySide2 reference signatures (binding differences may apply):
script(self) -> PySide2.QtCore.QLocale.Script
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#script
scriptToString
scriptToString(script: Any) -> str
X.scriptToString(script) -> str
Supplemental documentation: Qt 5 reference:
[static] QString QLocale::scriptToString(QLocale::Script script)
Returns a QString containing the name of script.
This function was introduced in Qt 4.8.
See also languageToString(), countryToString(), script(), and bcp47Name().
Upstream PySide2 reference signatures (binding differences may apply):
scriptToString(script: PySide2.QtCore.QLocale.Script) -> str
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#scriptToString
setDefault
setDefault(locale: Any) -> None
X.setDefault(locale)
Supplemental documentation: Qt 5 reference:
[static] void QLocale::setDefault(const QLocale \&locale)
Sets the global default locale to locale. These values are used when a QLocale object is constructed with no arguments. If this function is not called, the system's locale is used.
Warning: In a multithreaded application, the default locale should be set at application startup, before any non-GUI threads are created.
Warning: This function is not reentrant.
Upstream PySide2 reference signatures (binding differences may apply):
setDefault(locale: PySide2.QtCore.QLocale) -> None
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#setDefault
setNumberOptions
setNumberOptions(options: Any) -> None
X.setNumberOptions(options)
Supplemental documentation: Qt 5 reference:
void QLocale::setNumberOptions(QLocale::NumberOptions options)
Sets the options related to number conversions for this QLocale instance.
This function was introduced in Qt 4.2.
See also numberOptions().
Upstream PySide2 reference signatures (binding differences may apply):
setNumberOptions(self, options: PySide2.QtCore.QLocale.NumberOptions) -> None
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#setNumberOptions
standaloneDayName
standaloneDayName(arg__1: int, format: Any) -> str
X.standaloneDayName(arg__1, format) -> str
Supplemental documentation: Qt 5 reference:
QString QLocale::standaloneDayName(int day, QLocale::FormatType type \= LongFormat) const
Returns the localized name of the day (where 1 represents Monday, 2 represents Tuesday and so on) that is used as a standalone text, in the format specified by type.
If the locale information does not specify the standalone day name then return value is the same as in dayName().
This function was introduced in Qt 4.5.
See also dayName() and standaloneMonthName().
Upstream PySide2 reference signatures (binding differences may apply):
standaloneDayName(self, arg__1: int, format: PySide2.QtCore.QLocale.FormatType=...) -> str
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#standaloneDayName
standaloneMonthName
standaloneMonthName(arg__1: int, format: Any) -> str
X.standaloneMonthName(arg__1, format) -> str
Supplemental documentation: Qt 5 reference:
QString QLocale::standaloneMonthName(int month, QLocale::FormatType type \= LongFormat) const
Returns the localized name of month that is used as a standalone text, in the format specified by type.
If the locale information doesn't specify the standalone month name then return value is the same as in monthName().
This function was introduced in Qt 4.5.
See also monthName() and standaloneDayName().
Upstream PySide2 reference signatures (binding differences may apply):
standaloneMonthName(self, arg__1: int, format: PySide2.QtCore.QLocale.FormatType=...) -> str
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#standaloneMonthName
system
system() -> Any
X.system() -> PythonQt.QtCore.QLocale
Supplemental documentation: Qt 5 reference:
[static] QLocale QLocale::system()
Returns a QLocale object initialized to the system locale.
On Windows and Mac, this locale will use the decimal/grouping characters and date/time formats specified in the system configuration panel.
See also c().
Upstream PySide2 reference signatures (binding differences may apply):
system() -> PySide2.QtCore.QLocale
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#system
textDirection
textDirection() -> Any
X.textDirection()
Supplemental documentation: Qt 5 reference:
Qt::LayoutDirection QLocale::textDirection() const
Returns the text direction of the language.
This function was introduced in Qt 4.7.
Upstream PySide2 reference signatures (binding differences may apply):
textDirection(self) -> PySide2.QtCore.Qt.LayoutDirection
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#textDirection
timeFormat
timeFormat(format: Any) -> str
X.timeFormat(format) -> str
Supplemental documentation: Qt 5 reference:
QString QLocale::timeFormat(QLocale::FormatType format \= LongFormat) const
Returns the time format used for the current locale.
If format is
LongFormat, the
format will be elaborate, otherwise it will be short. For example,
LongFormat for the
en_US locale is h:mm:ss AP t,
ShortFormat is h:mm
AP.
This function was introduced in Qt 4.1.
See also QTime::toString() and QTime::fromString().
Upstream PySide2 reference signatures (binding differences may apply):
timeFormat(self, format: PySide2.QtCore.QLocale.FormatType=...) -> str
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#timeFormat
toCurrencyString
toCurrencyString(arg__1: Any, symbol: str) -> str
X.toCurrencyString(arg__1, symbol) -> str
Supplemental documentation: Qt 5 reference:
QString QLocale::toCurrencyString(float value, const QString \&symbol \= QString()) const
QString QLocale::toCurrencyString(float i, const QString \&symbol, int precision) const
QString QLocale::toCurrencyString(qlonglong value, const QString \&symbol \= QString()) const
Returns a localized string representation of value as a currency. If the symbol is provided it is used instead of the default currency symbol.
This function was introduced in Qt 4.8.
See also currencySymbol().
QString QLocale::toCurrencyString(qulonglong value, const QString \&symbol \= QString()) const
This is an overloaded function.
This function was introduced in Qt 4.8.
QString QLocale::toCurrencyString(short value, const QString \&symbol \= QString()) const
This is an overloaded function.
This function was introduced in Qt 4.8.
QString QLocale::toCurrencyString(ushort value, const QString \&symbol \= QString()) const
This is an overloaded function.
This function was introduced in Qt 4.8.
QString QLocale::toCurrencyString(int value, const QString \&symbol \= QString()) const
This is an overloaded function.
This function was introduced in Qt 4.8.
QString QLocale::toCurrencyString(uint value, const QString \&symbol \= QString()) const
This is an overloaded function.
This function was introduced in Qt 4.8.
QString QLocale::toCurrencyString(double value, const QString \&symbol \= QString()) const
This is an overloaded function.
This function was introduced in Qt 4.8.
QString QLocale::toCurrencyString(double value, const QString \&symbol, int precision) const
This function overloads toCurrencyString().
Returns a localized string representation of value as a currency. If the symbol is provided it is used instead of the default currency symbol. If the precision is provided it is used to set the precision of the currency value.
This function was introduced in Qt 5.7.
See also currencySymbol().
Upstream PySide2 reference signatures (binding differences may apply):
toCurrencyString(self, arg__1: float, symbol: str, precision: int) -> str
toCurrencyString(self, arg__1: float, symbol: str=...) -> str
toCurrencyString(self, arg__1: int, symbol: str=...) -> str
toCurrencyString(self, arg__1: int, symbol: str=...) -> str
toCurrencyString(self, arg__1: int, symbol: str=...) -> str
toCurrencyString(self, arg__1: int, symbol: str=...) -> str
toCurrencyString(self, arg__1: int, symbol: str=...) -> str
toCurrencyString(self, arg__1: int, symbol: str=...) -> str
toCurrencyString(self, i: float, symbol: str, precision: int) -> str
toCurrencyString(self, i: float, symbol: str=...) -> str
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#toCurrencyString
toDate
toDate(string: str, arg__2: Any) -> Any
X.toDate(string, arg__2) -> PythonQt.QtCore.QDate
Supplemental documentation: Qt 5 reference:
QDate QLocale::toDate(const QString \&string, QLocale::FormatType format \= LongFormat) const
Parses the date string given in string and returns the date. The format of the date string is chosen according to the format parameter (see dateFormat()).
If the date could not be parsed, returns an invalid date.
This function was introduced in Qt 4.4.
See also dateFormat(), toTime(), toDateTime(), and QDate::fromString().
QDate QLocale::toDate(const QString \&string, const QString \&format) const
Parses the date string given in string and returns the date. See QDate::fromString() for information on the expressions that can be used with this function.
This function searches month names and the names of the days of the week in the current locale.
If the date could not be parsed, returns an invalid date.
This function was introduced in Qt 4.4.
See also dateFormat(), toTime(), toDateTime(), and QDate::fromString().
QDate QLocale::toDate(const QString \&string, QLocale::FormatType format, QCalendar cal) const
This is an overloaded function.
This function was introduced in Qt 5.14.
QDate QLocale::toDate(const QString \&string, const QString \&format, QCalendar cal) const
This is an overloaded function.
This function was introduced in Qt 5.14.
Upstream PySide2 reference signatures (binding differences may apply):
toDate(self, string: str, format: PySide2.QtCore.QLocale.FormatType, cal: PySide2.QtCore.QCalendar) -> PySide2.QtCore.QDate
toDate(self, string: str, format: PySide2.QtCore.QLocale.FormatType=...) -> PySide2.QtCore.QDate
toDate(self, string: str, format: str) -> PySide2.QtCore.QDate
toDate(self, string: str, format: str, cal: PySide2.QtCore.QCalendar) -> PySide2.QtCore.QDate
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#toDate
toDateTime
toDateTime(string: str, format: Any) -> Any
X.toDateTime(string, format) -> PythonQt.QtCore.QDateTime
Supplemental documentation: Qt 5 reference:
QDateTime QLocale::toDateTime(const QString \&string, QLocale::FormatType format \= LongFormat) const
Parses the date/time string given in string and returns the time. The format of the date/time string is chosen according to the format parameter (see dateTimeFormat()).
If the string could not be parsed, returns an invalid QDateTime.
This function was introduced in Qt 4.4.
See also dateTimeFormat(), toTime(), toDate(), and QDateTime::fromString().
QDateTime QLocale::toDateTime(const QString \&string, const QString \&format) const
Parses the date/time string given in string and returns the time. See QDateTime::fromString() for information on the expressions that can be used with this function.
Note: The month and day names used must be given in the user's local language.
If the string could not be parsed, returns an invalid QDateTime. If the string can be parsed and represents an invalid date-time (e.g. in a gap skipped by a time-zone transition), an invalid QDateTime is returned, whose toMSecsSinceEpoch() represents a near-by date-time that is valid. Passing that to fromMSecsSinceEpoch() will produce a valid date-time that isn't faithfully represented by the string parsed.
This function was introduced in Qt 4.4.
See also dateTimeFormat(), toTime(), toDate(), and QDateTime::fromString().
QDateTime QLocale::toDateTime(const QString \&string, QLocale::FormatType format, QCalendar cal) const
This is an overloaded function.
This function was introduced in Qt 5.14.
QDateTime QLocale::toDateTime(const QString \&string, const QString \&format, QCalendar cal) const
This is an overloaded function.
This function was introduced in Qt 5.14.
Upstream PySide2 reference signatures (binding differences may apply):
toDateTime(self, string: str, format: PySide2.QtCore.QLocale.FormatType, cal: PySide2.QtCore.QCalendar) -> PySide2.QtCore.QDateTime
toDateTime(self, string: str, format: PySide2.QtCore.QLocale.FormatType=...) -> PySide2.QtCore.QDateTime
toDateTime(self, string: str, format: str) -> PySide2.QtCore.QDateTime
toDateTime(self, string: str, format: str, cal: PySide2.QtCore.QCalendar) -> PySide2.QtCore.QDateTime
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#toDateTime
toDouble
toDouble(s: str, ok: Any) -> float
X.toDouble(s, ok) -> float
Supplemental documentation: Qt 5 reference:
double QLocale::toDouble(const QString \&s, bool *ok \= nullptr) const
Returns the double represented by the localized string s.
Returns an infinity if the conversion overflows or 0.0 if the conversion fails for any other reason (e.g. underflow).
If ok is not nullptr, failure is reported by setting *ok to false, and success
by setting *ok to true.
This function does not fall back to the 'C' locale if the string cannot be interpreted in this locale.
bool ok;
double d;
QLocale c(QLocale::C);
d = c.toDouble("1234.56", &ok); // ok == true, d == 1234.56
d = c.toDouble("1,234.56", &ok); // ok == true, d == 1234.56
d = c.toDouble("1234,56", &ok); // ok == false, d == 0
QLocale german(QLocale::German);
d = german.toDouble("1234,56", &ok); // ok == true, d == 1234.56
d = german.toDouble("1.234,56", &ok); // ok == true, d == 1234.56
d = german.toDouble("1234.56", &ok); // ok == false, d == 0
d = german.toDouble("1.234", &ok); // ok == true, d == 1234.0
Notice that the last conversion returns 1234.0, because '.' is the thousands group separator in the German locale.
This function ignores leading and trailing whitespace.
See also toFloat(), toInt(), and toString().
double QLocale::toDouble(const QStringRef \&s, bool *ok \= nullptr) const
Returns the double represented by the localized string s.
Returns an infinity if the conversion overflows or 0.0 if the conversion fails for any other reason (e.g. underflow).
If ok is not nullptr, failure is reported by setting *ok to false, and success
by setting *ok to true.
This function does not fall back to the 'C' locale if the string cannot be interpreted in this locale.
bool ok;
double d;
QLocale c(QLocale::C);
d = c.toDouble("1234.56", &ok); // ok == true, d == 1234.56
d = c.toDouble("1,234.56", &ok); // ok == true, d == 1234.56
d = c.toDouble("1234,56", &ok); // ok == false, d == 0
QLocale german(QLocale::German);
d = german.toDouble("1234,56", &ok); // ok == true, d == 1234.56
d = german.toDouble("1.234,56", &ok); // ok == true, d == 1234.56
d = german.toDouble("1234.56", &ok); // ok == false, d == 0
d = german.toDouble("1.234", &ok); // ok == true, d == 1234.0
Notice that the last conversion returns 1234.0, because '.' is the thousands group separator in the German locale.
This function ignores leading and trailing whitespace.
This function was introduced in Qt 5.1.
See also toFloat(), toInt(), and toString().
double QLocale::toDouble(QStringView s, bool *ok \= nullptr) const
Returns the double represented by the localized string s.
Returns an infinity if the conversion overflows or 0.0 if the conversion fails for any other reason (e.g. underflow).
If ok is not nullptr, failure is reported by setting *ok to false, and success
by setting *ok to true.
Unlike QString::toDouble(), this function does not fall back to the "C" locale if the string cannot be interpreted in this locale.
bool ok;
double d;
QLocale c(QLocale::C);
d = c.toDouble(u"1234.56", &ok); // ok == true, d == 1234.56
d = c.toDouble(u"1,234.56", &ok); // ok == true, d == 1234.56
d = c.toDouble(u"1234,56", &ok); // ok == false, d == 0
QLocale german(QLocale::German);
d = german.toDouble(u"1234,56", &ok); // ok == true, d == 1234.56
d = german.toDouble(u"1.234,56", &ok); // ok == true, d == 1234.56
d = german.toDouble(u"1234.56", &ok); // ok == false, d == 0
d = german.toDouble(u"1.234", &ok); // ok == true, d == 1234.0
Notice that the last conversion returns 1234.0, because '.' is the thousands group separator in the German locale.
This function ignores leading and trailing whitespace.
This function was introduced in Qt 5.10.
See also toFloat(), toInt(), and toString().
Upstream PySide2 reference signatures (binding differences may apply):
toDouble(self, s: str) -> typing.Tuple[float, bool]
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#toDouble
toFloat
toFloat(s: str, ok: Any) -> float
X.toFloat(s, ok) -> float
Supplemental documentation: Qt 5 reference:
float QLocale::toFloat(const QString \&s, bool *ok \= nullptr) const
Returns the float represented by the localized string s.
Returns an infinity if the conversion overflows or 0.0 if the conversion fails for any other reason (e.g. underflow).
If ok is not nullptr, failure is reported by setting *ok to false, and success
by setting *ok to true.
This function does not fall back to the 'C' locale if the string cannot be interpreted in this locale.
This function ignores leading and trailing whitespace.
See also toDouble(), toInt(), and toString().
float QLocale::toFloat(const QStringRef \&s, bool *ok \= nullptr) const
Returns the float represented by the localized string s.
Returns an infinity if the conversion overflows or 0.0 if the conversion fails for any other reason (e.g. underflow).
If ok is not nullptr, failure is reported by setting *ok to false, and success
by setting *ok to true.
This function does not fall back to the 'C' locale if the string cannot be interpreted in this locale.
This function ignores leading and trailing whitespace.
This function was introduced in Qt 5.1.
See also toDouble(), toInt(), and toString().
float QLocale::toFloat(QStringView s, bool *ok \= nullptr) const
Returns the float represented by the localized string s.
Returns an infinity if the conversion overflows or 0.0 if the conversion fails for any other reason (e.g. underflow).
If ok is not nullptr, failure is reported by setting *ok to false, and success
by setting *ok to true.
This function ignores leading and trailing whitespace.
This function was introduced in Qt 5.10.
See also toDouble(), toInt(), and toString().
Upstream PySide2 reference signatures (binding differences may apply):
toFloat(self, s: str) -> typing.Tuple[float, bool]
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#toFloat
toInt
toInt(s: str, ok: Any) -> int
X.toInt(s, ok) -> int
Supplemental documentation: Qt 5 reference:
int QLocale::toInt(const QString \&s, bool *ok \= nullptr) const
Returns the int represented by the localized string s.
If the conversion fails the function returns 0.
If ok is not nullptr, failure is reported by setting *ok to false, and success
by setting *ok to true.
This function ignores leading and trailing whitespace.
See also toUInt() and toString().
int QLocale::toInt(const QStringRef \&s, bool *ok \= nullptr) const
Returns the int represented by the localized string s.
If the conversion fails the function returns 0.
If ok is not nullptr, failure is reported by setting *ok to false, and success
by setting *ok to true.
This function ignores leading and trailing whitespace.
This function was introduced in Qt 5.1.
See also toUInt() and toString().
int QLocale::toInt(QStringView s, bool *ok \= nullptr) const
Returns the int represented by the localized string s.
If the conversion fails, the function returns 0.
If ok is not nullptr, failure is reported by setting *ok to false, and success
by setting *ok to true.
This function ignores leading and trailing whitespace.
This function was introduced in Qt 5.10.
See also toUInt() and toString().
Upstream PySide2 reference signatures (binding differences may apply):
toInt(self, s: str) -> typing.Tuple[int, bool]
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#toInt
toLongLong
toLongLong(s: str, ok: Any) -> int
X.toLongLong(s, ok) -> int
Supplemental documentation: Qt 5 reference:
qlonglong QLocale::toLongLong(const QString \&s, bool *ok \= nullptr) const
Returns the long long int represented by the localized string s.
If the conversion fails the function returns 0.
If ok is not nullptr, failure is reported by setting *ok to false, and success
by setting *ok to true.
This function ignores leading and trailing whitespace.
See also toInt(), toULongLong(), toDouble(), and toString().
qlonglong QLocale::toLongLong(const QStringRef \&s, bool *ok \= nullptr) const
Returns the long long int represented by the localized string s.
If the conversion fails the function returns 0.
If ok is not nullptr, failure is reported by setting *ok to false, and success
by setting *ok to true.
This function ignores leading and trailing whitespace.
This function was introduced in Qt 5.1.
See also toInt(), toULongLong(), toDouble(), and toString().
qlonglong QLocale::toLongLong(QStringView s, bool *ok \= nullptr) const
Returns the long long int represented by the localized string s.
If the conversion fails, the function returns 0.
If ok is not nullptr, failure is reported by setting *ok to false, and success
by setting *ok to true.
This function ignores leading and trailing whitespace.
This function was introduced in Qt 5.10.
See also toInt(), toULongLong(), toDouble(), and toString().
Upstream PySide2 reference signatures (binding differences may apply):
toLongLong(self, s: str) -> typing.Tuple[int, bool]
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#toLongLong
toLower
toLower(str: str) -> str
X.toLower(str) -> str
Supplemental documentation: Qt 5 reference:
QString QLocale::toLower(const QString \&str) const
Returns a lowercase copy of str.
If Qt Core is using the ICU libraries, they will be used to perform the transformation according to the rules of the current locale. Otherwise the conversion may be done in a platform-dependent manner, with QString::toLower() as a generic fallback.
This function was introduced in Qt 4.8.
See also QString::toLower().
Upstream PySide2 reference signatures (binding differences may apply):
toLower(self, str: str) -> str
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#toLower
toShort
toShort(s: str, ok: Any) -> int
X.toShort(s, ok) -> int
Supplemental documentation: Qt 5 reference:
short QLocale::toShort(const QString \&s, bool *ok \= nullptr) const
Returns the short int represented by the localized string s.
If the conversion fails the function returns 0.
If ok is not nullptr, failure is reported by setting *ok to false, and success
by setting *ok to true.
This function ignores leading and trailing whitespace.
See also toUShort() and toString().
short QLocale::toShort(const QStringRef \&s, bool *ok \= nullptr) const
Returns the short int represented by the localized string s.
If the conversion fails the function returns 0.
If ok is not nullptr, failure is reported by setting *ok to false, and success
by setting *ok to true.
This function ignores leading and trailing whitespace.
This function was introduced in Qt 5.1.
See also toUShort() and toString().
short QLocale::toShort(QStringView s, bool *ok \= nullptr) const
Returns the short int represented by the localized string s.
If the conversion fails, the function returns 0.
If ok is not nullptr, failure is reported by setting *ok to false, and success
by setting *ok to true.
This function ignores leading and trailing whitespace.
This function was introduced in Qt 5.10.
See also toUShort() and toString().
Upstream PySide2 reference signatures (binding differences may apply):
toShort(self, s: str) -> typing.Tuple[int, bool]
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#toShort
toString
toString(i: Any, f: Any, prec: Any) -> str
X.toString(i, f, prec) -> str
Supplemental documentation: Qt 5 reference:
QString QLocale::toString(qlonglong i) const
Returns a localized string representation of i.
See also toLongLong(), numberOptions(), zeroDigit(), and positiveSign().
QString QLocale::toString(qulonglong i) const
This is an overloaded function.
See also toULongLong(), numberOptions(), zeroDigit(), and positiveSign().
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(double i, char f \= 'g', int prec \= 6) const
This is an overloaded function.
f and prec have the same meaning as in QString::number(double, char, int).
See also toDouble(), numberOptions(), exponential(), decimalPoint(), zeroDigit(), positiveSign(), and percent().
QString QLocale::toString(float i, char f \= 'g', int prec \= 6) const
This is an overloaded function.
f and prec have the same meaning as in QString::number(double, char, int).
See also toDouble().
QString QLocale::toString(const QDate \&date, const QString \&format) const
Returns a localized string representation of the given date in the specified format. If format is an empty string, an empty string is returned.
See also QDate::toString().
QString QLocale::toString(const QTime \&time, const QString \&format) const
Returns a localized string representation of the given time according to the specified format. If format is an empty string, an empty string is returned.
See also QTime::toString().
QString QLocale::toString(const QDateTime \&dateTime, const QString \&format) const
Returns a localized string representation of the given dateTime according to the specified format. If format is an empty string, an empty string is returned.
This function was introduced in Qt 4.4.
See also QDateTime::toString(), QDate::toString(), and QTime::toString().
QString QLocale::toString(const QDate \&date, QStringView format) const
This is an overloaded function.
This function was introduced in Qt 5.10.
QString QLocale::toString(const QTime \&time, QStringView format) const
Returns a localized string representation of the given time according to the specified format. If format is an empty string, an empty string is returned.
This function was introduced in Qt 4.5.
See also QTime::toString().
QString QLocale::toString(const QDateTime \&dateTime, QStringView format) const
This is an overloaded function.
This function was introduced in Qt 5.10.
QString QLocale::toString(const QDate \&date, QLocale::FormatType format \= LongFormat) const
This is an overloaded function.
This function was introduced in Qt 4.5.
QString QLocale::toString(const QTime \&time, QLocale::FormatType format \= LongFormat) const
Returns a localized string representation of the given time in the specified format (see timeFormat()).
QString QLocale::toString(const QDateTime \&dateTime, QLocale::FormatType format \= LongFormat) const
This is an overloaded function.
This function was introduced in Qt 4.4.
QString QLocale::toString(const QDate \&date, QStringView format, QCalendar cal) const
Returns a localized string representation of the given date in the specified format, optionally for a specified calendar cal. If format is an empty string, an empty string is returned.
This function was introduced in Qt 5.14.
See also QDate::toString().
QString QLocale::toString(const QDate \&date, QLocale::FormatType format, QCalendar cal) const
Returns a localized string representation of the given date according to the specified format (see dateFormat()), optionally for a specified calendar cal.
Note: Some locales may use formats that limit the range of years they can represent.
This function was introduced in Qt 5.14.
QString QLocale::toString(const QDateTime \&dateTime, QLocale::FormatType format, QCalendar cal) const
Returns a localized string representation of the given dateTime according to the specified format (see dateTimeFormat()), optionally for a specified calendar cal.
Note: Some locales may use formats that limit the range of years they can represent.
This function was introduced in Qt 5.14.
QString QLocale::toString(const QDateTime \&dateTime, QStringView format, QCalendar cal) const
Returns a localized string representation of the given dateTime according to the specified format, optionally for a specified calendar cal. If format is an empty string, an empty string is returned.
This function was introduced in Qt 5.14.
See also QDateTime::toString(), QDate::toString(), and QTime::toString().
Upstream PySide2 reference signatures (binding differences may apply):
toString(self, date: PySide2.QtCore.QDate, format: PySide2.QtCore.QLocale.FormatType, cal: PySide2.QtCore.QCalendar) -> str
toString(self, date: PySide2.QtCore.QDate, format: PySide2.QtCore.QLocale.FormatType=...) -> str
toString(self, date: PySide2.QtCore.QDate, formatStr: str) -> str
toString(self, dateTime: PySide2.QtCore.QDateTime, format: PySide2.QtCore.QLocale.FormatType, cal: PySide2.QtCore.QCalendar) -> str
toString(self, dateTime: PySide2.QtCore.QDateTime, format: PySide2.QtCore.QLocale.FormatType=...) -> str
toString(self, dateTime: PySide2.QtCore.QDateTime, format: str) -> str
toString(self, i: float, f: int=..., prec: int=...) -> str
toString(self, i: float, f: int=..., prec: int=...) -> str
toString(self, i: int) -> str
toString(self, i: int) -> str
toString(self, i: int) -> str
toString(self, i: int) -> str
toString(self, i: int) -> str
toString(self, time: PySide2.QtCore.QTime, format: PySide2.QtCore.QLocale.FormatType=...) -> str
toString(self, time: PySide2.QtCore.QTime, formatStr: str) -> str
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#toString
toTime
toTime(string: str, arg__2: Any) -> Any
X.toTime(string, arg__2) -> PythonQt.QtCore.QTime
Supplemental documentation: Qt 5 reference:
QTime QLocale::toTime(const QString \&string, QLocale::FormatType format \= LongFormat) const
Parses the time string given in string and returns the time. The format of the time string is chosen according to the format parameter (see timeFormat()).
If the time could not be parsed, returns an invalid time.
This function was introduced in Qt 4.4.
See also timeFormat(), toDate(), toDateTime(), and QTime::fromString().
QTime QLocale::toTime(const QString \&string, const QString \&format) const
Parses the time string given in string and returns the time. See QTime::fromString() for information on what is a valid format string.
If the time could not be parsed, returns an invalid time.
This function was introduced in Qt 4.4.
See also timeFormat(), toDate(), toDateTime(), and QTime::fromString().
Upstream PySide2 reference signatures (binding differences may apply):
toTime(self, string: str, format: PySide2.QtCore.QLocale.FormatType, cal: PySide2.QtCore.QCalendar) -> PySide2.QtCore.QTime
toTime(self, string: str, format: PySide2.QtCore.QLocale.FormatType=...) -> PySide2.QtCore.QTime
toTime(self, string: str, format: str) -> PySide2.QtCore.QTime
toTime(self, string: str, format: str, cal: PySide2.QtCore.QCalendar) -> PySide2.QtCore.QTime
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#toTime
toUInt
toUInt(s: str, ok: Any) -> int
X.toUInt(s, ok) -> int
Supplemental documentation: Qt 5 reference:
uint QLocale::toUInt(const QString \&s, bool *ok \= nullptr) const
Returns the unsigned int represented by the localized string s.
If the conversion fails the function returns 0.
If ok is not nullptr, failure is reported by setting *ok to false, and success
by setting *ok to true.
This function ignores leading and trailing whitespace.
See also toInt() and toString().
uint QLocale::toUInt(const QStringRef \&s, bool *ok \= nullptr) const
Returns the unsigned int represented by the localized string s.
If the conversion fails the function returns 0.
If ok is not nullptr, failure is reported by setting *ok to false, and success
by setting *ok to true.
This function ignores leading and trailing whitespace.
This function was introduced in Qt 5.1.
See also toInt() and toString().
uint QLocale::toUInt(QStringView s, bool *ok \= nullptr) const
Returns the unsigned int represented by the localized string s.
If the conversion fails, the function returns 0.
If ok is not nullptr, failure is reported by setting *ok to false, and success
by setting *ok to true.
This function ignores leading and trailing whitespace.
This function was introduced in Qt 5.10.
See also toInt() and toString().
Upstream PySide2 reference signatures (binding differences may apply):
toUInt(self, s: str) -> typing.Tuple[int, bool]
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#toUInt
toULongLong
toULongLong(s: str, ok: Any) -> int
X.toULongLong(s, ok) -> int
Supplemental documentation: Qt 5 reference:
qulonglong QLocale::toULongLong(const QString \&s, bool *ok \= nullptr) const
Returns the unsigned long long int represented by the localized string s.
If the conversion fails the function returns 0.
If ok is not nullptr, failure is reported by setting *ok to false, and success
by setting *ok to true.
This function ignores leading and trailing whitespace.
See also toLongLong(), toInt(), toDouble(), and toString().
qulonglong QLocale::toULongLong(const QStringRef \&s, bool *ok \= nullptr) const
Returns the unsigned long long int represented by the localized string s.
If the conversion fails the function returns 0.
If ok is not nullptr, failure is reported by setting *ok to false, and success
by setting *ok to true.
This function ignores leading and trailing whitespace.
This function was introduced in Qt 5.1.
See also toLongLong(), toInt(), toDouble(), and toString().
qulonglong QLocale::toULongLong(QStringView s, bool *ok \= nullptr) const
Returns the unsigned long long int represented by the localized string s.
If the conversion fails, the function returns 0.
If ok is not nullptr, failure is reported by setting *ok to false, and success
by setting *ok to true.
This function ignores leading and trailing whitespace.
This function was introduced in Qt 5.10.
See also toLongLong(), toInt(), toDouble(), and toString().
Upstream PySide2 reference signatures (binding differences may apply):
toULongLong(self, s: str) -> typing.Tuple[int, bool]
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#toULongLong
toUShort
toUShort(s: str, ok: Any) -> int
X.toUShort(s, ok) -> int
Supplemental documentation: Qt 5 reference:
ushort QLocale::toUShort(const QString \&s, bool *ok \= nullptr) const
Returns the unsigned short int represented by the localized string s.
If the conversion fails the function returns 0.
If ok is not nullptr, failure is reported by setting *ok to false, and success
by setting *ok to true.
This function ignores leading and trailing whitespace.
See also toShort() and toString().
ushort QLocale::toUShort(const QStringRef \&s, bool *ok \= nullptr) const
Returns the unsigned short int represented by the localized string s.
If the conversion fails the function returns 0.
If ok is not nullptr, failure is reported by setting *ok to false, and success
by setting *ok to true.
This function ignores leading and trailing whitespace.
This function was introduced in Qt 5.1.
See also toShort() and toString().
ushort QLocale::toUShort(QStringView s, bool *ok \= nullptr) const
Returns the unsigned short int represented by the localized string s.
If the conversion fails, the function returns 0.
If ok is not nullptr, failure is reported by setting *ok to false, and success
by setting *ok to true.
This function ignores leading and trailing whitespace.
This function was introduced in Qt 5.10.
See also toShort() and toString().
Upstream PySide2 reference signatures (binding differences may apply):
toUShort(self, s: str) -> typing.Tuple[int, bool]
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#toUShort
toUpper
toUpper(str: str) -> str
X.toUpper(str) -> str
Supplemental documentation: Qt 5 reference:
QString QLocale::toUpper(const QString \&str) const
Returns an uppercase copy of str.
If Qt Core is using the ICU libraries, they will be used to perform the transformation according to the rules of the current locale. Otherwise the conversion may be done in a platform-dependent manner, with QString::toUpper() as a generic fallback.
Note: In some cases the uppercase form of a string may be longer than the original.
This function was introduced in Qt 4.8.
See also QString::toUpper().
Upstream PySide2 reference signatures (binding differences may apply):
toUpper(self, str: str) -> str
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#toUpper
uiLanguages
uiLanguages() -> tuple
X.uiLanguages() -> tuple
Supplemental documentation: Qt 5 reference:
QStringList QLocale::uiLanguages() const
Returns an ordered list of locale names for translation purposes in preference order (like "en-Latn-US", "en-US", "en").
The return value represents locale names that the user expects to see the UI translation in.
Most like you do not need to use this function directly, but just pass the QLocale object to the QTranslator::load() function.
The first item in the list is the most preferred one.
This function was introduced in Qt 4.8.
See also QTranslator and bcp47Name().
Upstream PySide2 reference signatures (binding differences may apply):
uiLanguages(self) -> typing.List[str]
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#uiLanguages
weekdays
weekdays() -> tuple
X.weekdays() -> tuple
Supplemental documentation: Qt 5 reference:
QList\<Qt::DayOfWeek> QLocale::weekdays() const
Returns a list of days that are considered weekdays according to the current locale.
This function was introduced in Qt 4.8.
Upstream PySide2 reference signatures (binding differences may apply):
weekdays(self) -> typing.List[PySide2.QtCore.Qt.DayOfWeek]
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#weekdays
zeroDigit
zeroDigit() -> str
X.zeroDigit()
Supplemental documentation: Qt 5 reference:
QChar QLocale::zeroDigit() const
Returns the zero digit character of this locale.
Note: This function shall change to return a QString instead of QChar in Qt6. Callers are encouraged to exploit the QString(QChar) constructor to convert early in preparation for this.
This function was introduced in Qt 4.1.
See also toString().
Upstream PySide2 reference signatures (binding differences may apply):
zeroDigit(self) -> str
Source: https://doc.qt.io/archives/qt-5.15/qlocale.html#zeroDigit