Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions | ![]() |
The QModelIndex class is used to locate data in a data model. More...
#include <QModelIndex>
The QModelIndex class is used to locate data in a data model.
This class is used as an index into item models derived from QAbstractItemModel. The index is used by item views, delegates, and selection models to locate an item in the model. QModelIndex objects are created by the model.
An invalid model index can be constructed with the zero argument form of the QModelIndex() constructor. This is useful when referring to top-level items in a model.
A model index has a row(), a column(), and a type().
See also Model/View Programming, QPersistentModelIndex, and QAbstractItemModel.
A model index locates an item in a view or in a view's horizontal or vertical header.
QModelIndex::View | |
QModelIndex::HorizontalHeader | |
QModelIndex::VerticalHeader |
Creates a new invalid model index.
Creates a new model index that is a copy of the other model index.
Destroys the model index.
Returns the column this model index refers to.
Returns true if this model index is valid; otherwise returns false.
Returns the row this model index refers to.
Returns the Type of this model index.
Returns true if this model index does not refer to the same location as the other model index; otherwise returns false.
Returns true if this model index refers to the same location as the other model index; otherwise returns false.
Copyright © 2004 Trolltech. | Trademarks | Qt 4.0.0-tp1 |