QCollatorSortKey#
The QCollatorSortKey
class can be used to speed up string collation. More…
Synopsis#
Functions#
Detailed Description#
The QCollatorSortKey
class is always created by sortKey()
and is used for fast strings collation, for example when collating many strings.
- class PySide6.QtCore.QCollatorSortKey(other)#
- Parameters
other –
PySide6.QtCore.QCollatorSortKey
Constructs a copy of the other
collator key.
- PySide6.QtCore.QCollatorSortKey.compare(key)#
- Parameters
- Return type
int
Compares this key to otherKey
, which must have been created by the same QCollator
‘s sortKey() as this key. The comparison is performed in accordance with that QCollator
‘s sort order.
Returns a negative value if this key sorts before otherKey
, 0 if the two keys are equal or a positive value if this key sorts after otherKey
.
See also
operator
- PySide6.QtCore.QCollatorSortKey.__lt__(rhs)#
- Parameters
- Return type
bool
Both keys must have been created by the same QCollator
‘s sortKey(). Returns true
if lhs
should be sorted before rhs
, according to the QCollator
that created them; otherwise returns false
.
See also
- PySide6.QtCore.QCollatorSortKey.swap(other)#
- Parameters
other –
PySide6.QtCore.QCollatorSortKey
Swaps this collator key with other
.