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

QVariant QListWidgetItem::data ( int  role  )  const [virtual]

This function returns the item's data for a given role (see Qt::ItemDataRole). Reimplement this function if you need extra roles or special behavior for certain roles.

Definition at line 676 of file qlistwidget.cpp.

References QVector< T >::at(), and QVector< T >::count().

    role = (role == Qt::EditRole ? Qt::DisplayRole : role);
    for (int i = 0; i < values.count(); ++i)
        if (values.at(i).role == role)
            return values.at(i).value;
    return QVariant();

Generated by  Doxygen 1.6.0   Back to index