Skip to content

PythonQt.QtCore.QCollator · declarations 001

Back to PythonQt.QtCore.QCollator

caseSensitivity

caseSensitivity() -> Any

X.caseSensitivity()

Supplemental documentation: Qt 5 reference:

Qt::CaseSensitivity QCollator::caseSensitivity() const

Returns case sensitivity of the collator.

See also setCaseSensitivity().

Upstream PySide2 reference signatures (binding differences may apply):

caseSensitivity(self) -> PySide2.QtCore.Qt.CaseSensitivity

Source: https://doc.qt.io/archives/qt-5.15/qcollator.html#caseSensitivity

compare

compare(s1: str, len1: Any, s2: str, len2: Any) -> int

X.compare(s1, len1, s2, len2) -> int

Supplemental documentation: Qt 5 reference:

int QCollator::compare(QStringView s1, QStringView s2) const

Compares s1 with s2.

Returns an integer less than, equal to, or greater than zero depending on whether s1 sorts before, with or after s2.

This function was introduced in Qt 5.13.

int QCollator::compare(const QString \&s1, const QString \&s2) const

This is an overloaded function.

Compares s1 with s2.

Returns an integer less than, equal to, or greater than zero depending on whether s1 sorts before, with or after s2.

int QCollator::compare(const QStringRef \&s1, const QStringRef \&s2) const

This is an overloaded function.

Compares s1 with s2.

Returns an integer less than, equal to, or greater than zero depending on whether s1 sorts before, with or after s2.

int QCollator::compare(const QChar *s1, int len1, const QChar *s2, int len2) const

This is an overloaded function.

Compares s1 with s2. len1 and len2 specify the lengths of the QChar arrays pointed to by s1 and s2.

Returns an integer less than, equal to, or greater than zero depending on whether s1 sorts before, with or after s2.

Upstream PySide2 reference signatures (binding differences may apply):

compare(self, s1: str, len1: int, s2: str, len2: int) -> int
compare(self, s1: str, s2: str) -> int
compare(self, s1: str, s2: str) -> int

Source: https://doc.qt.io/archives/qt-5.15/qcollator.html#compare

ignorePunctuation

ignorePunctuation() -> bool

X.ignorePunctuation() -> bool

Supplemental documentation: Qt 5 reference:

bool QCollator::ignorePunctuation() const

Returns true if punctuation characters and symbols are ignored when determining sort order.

See also setIgnorePunctuation().

Upstream PySide2 reference signatures (binding differences may apply):

ignorePunctuation(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qcollator.html#ignorePunctuation

locale

locale() -> Any

X.locale() -> PythonQt.QtCore.QLocale

Supplemental documentation: Qt 5 reference:

QLocale QCollator::locale() const

Returns the locale of the collator.

See also setLocale().

Upstream PySide2 reference signatures (binding differences may apply):

locale(self) -> PySide2.QtCore.QLocale

Source: https://doc.qt.io/archives/qt-5.15/qcollator.html#locale

numericMode

numericMode() -> bool

X.numericMode() -> bool

Supplemental documentation: Qt 5 reference:

bool QCollator::numericMode() const

Returns true if numeric sorting is enabled, false otherwise.

See also setNumericMode().

Upstream PySide2 reference signatures (binding differences may apply):

numericMode(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qcollator.html#numericMode

operator_assign

operator_assign(arg__1: Any) -> Any

X.operator_assign(arg__1) -> PythonQt.QtCore.QCollator

operator_cast_

operator_cast_(s1: Any, s2: Any) -> bool

X.operator_cast_(s1, s2) -> bool

setCaseSensitivity

setCaseSensitivity(cs: Any) -> None

X.setCaseSensitivity(cs)

Supplemental documentation: Qt 5 reference:

void QCollator::setCaseSensitivity(Qt::CaseSensitivity sensitivity)

Sets the case sensitivity of the collator.

See also caseSensitivity().

Upstream PySide2 reference signatures (binding differences may apply):

setCaseSensitivity(self, cs: PySide2.QtCore.Qt.CaseSensitivity) -> None

Source: https://doc.qt.io/archives/qt-5.15/qcollator.html#setCaseSensitivity

setIgnorePunctuation

setIgnorePunctuation(on: bool) -> None

X.setIgnorePunctuation(on)

Supplemental documentation: Qt 5 reference:

void QCollator::setIgnorePunctuation(bool on)

If on is set to true, punctuation characters and symbols are ignored when determining sort order.

The default is locale dependent.

Note: This method is not currently supported if Qt is configured to not use ICU on Linux.

See also ignorePunctuation().

Upstream PySide2 reference signatures (binding differences may apply):

setIgnorePunctuation(self, on: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qcollator.html#setIgnorePunctuation

setLocale

setLocale(locale: Any) -> None

X.setLocale(locale)

Supplemental documentation: Qt 5 reference:

void QCollator::setLocale(const QLocale \&locale)

Sets the locale of the collator to locale.

See also locale().

Upstream PySide2 reference signatures (binding differences may apply):

setLocale(self, locale: PySide2.QtCore.QLocale) -> None

Source: https://doc.qt.io/archives/qt-5.15/qcollator.html#setLocale

setNumericMode

setNumericMode(on: bool) -> None

X.setNumericMode(on)

Supplemental documentation: Qt 5 reference:

void QCollator::setNumericMode(bool on)

Enables numeric sorting mode when on is set to true.

This will enable proper sorting of numeric digits, so that e.g. 100 sorts after 99.

By default this mode is off.

See also numericMode().

Upstream PySide2 reference signatures (binding differences may apply):

setNumericMode(self, on: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qcollator.html#setNumericMode

sortKey

sortKey(string: str) -> Any

X.sortKey(string) -> PythonQt.QtCore.QCollatorSortKey

Supplemental documentation: Qt 5 reference:

QCollatorSortKey QCollator::sortKey(const QString \&string) const

Returns a sortKey for string.

Creating the sort key is usually somewhat slower, than using the compare() methods directly. But if the string is compared repeatedly (e.g. when sorting a whole list of strings), it's usually faster to create the sort keys for each string and then sort using the keys.

Note: Not supported with the C (a.k.a. POSIX) locale on Darwin.

Upstream PySide2 reference signatures (binding differences may apply):

sortKey(self, string: str) -> PySide2.QtCore.QCollatorSortKey

Source: https://doc.qt.io/archives/qt-5.15/qcollator.html#sortKey

swap

swap(other: Any) -> None

X.swap(other)

Supplemental documentation: Qt 5 reference:

void QCollator::swap(QCollator \&other)

Swaps this collator with other. This function is very fast and never fails.

Upstream PySide2 reference signatures (binding differences may apply):

swap(self, other: PySide2.QtCore.QCollator) -> None

Source: https://doc.qt.io/archives/qt-5.15/qcollator.html#swap