Home · All Classes · Main Classes · Grouped Classes · Modules · Functions

QSortFilterProxyModel Class Reference
[QtGui module]

The QSortFilterProxyModel class provides support for sorting and filtering data passed between another model and a view. More...

#include <QSortFilterProxyModel>

Inherits QAbstractProxyModel.

This class was introduced in Qt 4.1.

Properties

Public Functions

Public Slots

Protected Functions

Additional Inherited Members


Detailed Description

The QSortFilterProxyModel class provides support for sorting and filtering data passed between another model and a view.

The sorting filter model transform the structure of a source model by mapping the model indexes it supplies to new indexes, corresponding to different locations, for views to use. This approach allows a given source model to be restructured as far as views are concerned without requiring any transformations on the underlying data.

The default implementation of the filter and sorting functions use the data for the items Qt::DisplayRole compare or accept items.

The default implementation of the lessThan() function used when sorting, can handle the following data types: