Sorts rows based on a source model string role. More...
Import Statement: | import SortFilterProxyModel . |
Inherits: |
StringSorter is a specialized RoleSorter that sorts rows based on a source model string role. StringSorter compares strings according to a localized collation algorithm.
In the following example, rows with be sorted by their lastName
role :
SortFilterProxyModel {
sourceModel: contactModel
sorters: StringSorter { roleName: "lastName" }
}
This property holds whether the sorter ignores punctation. if ignorePunctuation
is true
, punctuation characters and symbols are ignored when determining sort order.
Note: This property is not currently supported on Apple platforms or if Qt is configured to not use ICU on Linux.
This property holds whether the numeric mode of the sorter is enabled. This will enable proper sorting of numeric digits, so that e.g. 100 sorts after 99. By default this mode is off.