Can't get the list to display?
/*create QListView */
m_listViewA = new QListView(this);
m_listViewA->setGeometry(QRect(QPoint(0,100), QSize(100, 150)));
modelA = new QStandardItemModel( nrow, 1, this );
//fill model value
for( int r=0; r<nrow; r++ )
{
QString sstr = "[ " + QString::number(r) + " ]";
QStandardItem *item = new QStandardItem(QString("Idx ") + sstr);
modelA->setItem(r, 0, item);
}
//set model
m_listViewA->setModel(modelA);
m_listViewA->setSelectionMode( QAbstractItemView::ExtendedSelection );
QStringList slist;
foreach(const QStandardItem index, modelA) //ERROR
{
slist.append( index.data(Qt::DisplayRole ).toString());
}