{
int rowCount = model->rowCount();
int i;
for( i = 0; i < rowCount; i++ )
if ( sel->isRowSelected( i, qDestin->rootIndex() ) )
s = model->data( model->index( i, 0 ) ); <- compile error
rows.push_back( s );
return rows;
}
QStringList Destinataires::getDestList()
{
QStringList rows;
int rowCount = model->rowCount();
int i;
QString s;
QItemSelectionModel *sel = qDestin->selectionModel();
for( i = 0; i < rowCount; i++ )
if ( sel->isRowSelected( i, qDestin->rootIndex() ) )
s = model->data( model->index( i, 0 ) ); <- compile error
rows.push_back( s );
return rows;
}
To copy to clipboard, switch view to plain text mode
96 C:\Qt\test\sms\destin.cpp no match for 'operator=' in 's = *(((Destinataires*)this)->Destinataires::model->QAbstractItemModel::_vptr$QObject + 68u)(((const QModelIndex&)((const QModelIndex*)(&*(((Destinataires*)this)->Destinataires::model->QAbstractItemModel::_vptr$QObject + 48u)(i, 0, ((const QModelIndex&)((const QModelIndex*)(&QModelIndex()))))))), 0)'
96 C:\Qt\test\sms\destin.cpp no match for 'operator=' in 's = *(((Destinataires*)this)->Destinataires::model->QAbstractItemModel::_vptr$QObject + 68u)(((const QModelIndex&)((const QModelIndex*)(&*(((Destinataires*)this)->Destinataires::model->QAbstractItemModel::_vptr$QObject + 48u)(i, 0, ((const QModelIndex&)((const QModelIndex*)(&QModelIndex()))))))), 0)'
To copy to clipboard, switch view to plain text mode
What should I do to retrieve the QString s from the model ?
Bookmarks