Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!


Sorts rows based on a source model string role. More...

Import Statement: import Felgo 3.0
Since: Felgo 2.18.1



Detailed Description

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" }

Property Documentation

caseSensitivity : Qt.CaseSensitivity

This property holds the case sensitivity of the sorter.

ignorePunctation : bool

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.

locale : Locale

This property holds the locale of the sorter.

numericMode : bool

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.