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.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
create apps
create games
cross platform
native performance
3rd party services
game network
level editor
easiest to learn
biggest time saving
best support