版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_24890953/article/details/56831136
QList <int> GetRowId::requestRowId()
{
QItemSelectionModel *selections = ui->tableView_showExecuteInfo->selectionModel();
QModelIndexList selected = selections->selectedIndexes();
QMap <int, int> rowMap;
foreach (QModelIndex index, selected)
{
rowMap.insert(index.row(), 0);
}
//// qDebug() << "print : " <<rowMap;
//// qDebug() << "acount : " <<rowMap.count() ;
//// qDebug() <<"i = 0 : "<<rowMap.keys();
return rowMap.keys();
}