Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

Public Member Functions | Private Attributes | Friends

QPersistentModelIndex Class Reference

The QPersistentModelIndex class is used to locate data in a data model. More...

Collaboration diagram for QPersistentModelIndex:
Collaboration graph

List of all members.

Public Member Functions

QModelIndex child (int row, int column) const
int column () const
QVariant data (int role=Qt::DisplayRole) const
Qt::ItemFlags flags () const
qint64 internalId () const
void * internalPointer () const
bool isValid () const
const QAbstractItemModelmodel () const
 operator const QModelIndex & () const
bool operator!= (const QModelIndex &other) const
bool operator!= (const QPersistentModelIndex &other) const
bool operator< (const QPersistentModelIndex &other) const
QPersistentModelIndexoperator= (const QPersistentModelIndex &other)
QPersistentModelIndexoperator= (const QModelIndex &other)
bool operator== (const QModelIndex &other) const
bool operator== (const QPersistentModelIndex &other) const
QModelIndex parent () const
 QPersistentModelIndex (const QModelIndex &index)
 QPersistentModelIndex (const QPersistentModelIndex &other)
int row () const
QModelIndex sibling (int row, int column) const

Private Attributes



Q_CORE_EXPORT QDebug operator<< (QDebug, const QPersistentModelIndex &)
uint qHash (const QPersistentModelIndex &)

Detailed Description

The QPersistentModelIndex class is used to locate data in a data model.

A QPersistentModelIndex is a model index that can be stored by an application, and later used to access information in a model. Unlike the QModelIndex class, it is safe to store a QPersistentModelIndex since the model will ensure that references to items will continue to be valid as long as they can be accessed by the model.

It is good practice to check that persistent model indexes are valid before using them.

See also:
{Model/View Programming}, QModelIndex, QAbstractItemModel

Definition at line 107 of file qabstractitemmodel.h.

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index