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

void QComboBox::setItemData ( int  index,
const QVariant value,
int  role = Qt::UserRole 

Sets the data role for the item on the given index in the combobox to the specified value.

Definition at line 1554 of file qcombobox.cpp.

References QAbstractItemModel::index(), QModelIndex::isValid(), model(), rootModelIndex(), and QAbstractItemModel::setData().

Referenced by QAbstractFormBuilder::loadComboBoxExtraInfo().

    Q_D(const QComboBox);
    QModelIndex item = model()->index(index, d->modelColumn, rootModelIndex());
    if (item.isValid()) {
        model()->setData(item, value, role);

Generated by  Doxygen 1.6.0   Back to index