RoleSorter QML Type

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

Import Statement: import .
Inherits:

Sorter

Inherited By:

StringSorter

Properties

Detailed Description

A RoleSorter is a simple Sorter that sorts rows based on a source model role.

In the following example, rows with be sorted by their lastName role :

SortFilterProxyModel {
   sourceModel: contactModel
   sorters: RoleSorter { roleName: "lastName" }
}

Property Documentation

roleName : string

This property holds the role name that the sorter is using to query the source model's data when sorting items.