NoRulez
29th April 2010, 11:21
Hi,
is there something to find out which roles in a model are used (also user defined roles)?
I only find the following function QAbstractItemModel::roleNames (), but this is only for internal roles such as Qt::DisplayRole
I want to do something like the following (for example):
for(qint32 row = 0; row < pModel->rowCount(); ++row)
for(qint32 col= 0; col< pModel->columnCount(); ++col)
qDebug() << "Row: " << row << "; Column: " << col << "; Data: " << pModel->data(pModel->index(row, col), /*??????*/);
Best Regards
NoRulez
is there something to find out which roles in a model are used (also user defined roles)?
I only find the following function QAbstractItemModel::roleNames (), but this is only for internal roles such as Qt::DisplayRole
I want to do something like the following (for example):
for(qint32 row = 0; row < pModel->rowCount(); ++row)
for(qint32 col= 0; col< pModel->columnCount(); ++col)
qDebug() << "Row: " << row << "; Column: " << col << "; Data: " << pModel->data(pModel->index(row, col), /*??????*/);
Best Regards
NoRulez