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

QSortingProxyModel Class Reference
[QtGui module]

The QSortingProxyModel class provides support for sorting data that is passed between another model and a view. More...

#include <QSortingProxyModel>

Inherits QMappingProxyModel.

This class was introduced in Qt 4.1.

Public Types

Public Functions

Additional Inherited Members


Detailed Description

The QSortingProxyModel class provides support for sorting data that is passed between another model and a view.

See also QAbstractProxyModel, QAbstractItemModel, and Model/View Programming.


Member Type Documentation

typedef QSortingProxyModel::Compare

Defines the type of function to be used when comparing items of data from the model. Comparison functions must have a signature in the following form:

    bool(*Compare)(const QModelIndex &left, const QModelIndex &right);

Member Function Documentation

QSortingProxyModel::QSortingProxyModel ( QObject * parent = 0 )

Constructs a sorting proxy model with the given parent.

QSortingProxyModel::~QSortingProxyModel ()

Destroys the sorting proxy model.

void QSortingProxyModel::clear ()   [virtual]

Clears the sorting proxy model, removing all map.

Reimplemented from QMappingProxyModel.

void QSortingProxyModel::setGreaterThan ( Compare function )

Sets the given function to be used as the > operator when sorting;

void QSortingProxyModel::setLessThan ( Compare function )

Sets the given function to be used as the < operator when sorting;


Copyright © 2005 Trolltech Trademarks
Qt 4.1.0-rc1