I want to act on the selected rows in a qtableview.
I'm trying the code below, however, list.count() gives the amount of selected cells in stead of selected rows, I only need the rowcount. How do I get that please, I searched but seems I'm too dumb to find it.
Qt Code:
const QModelIndexList list = table->selectionModel()->selection().indexes(); for (int i = 0; i < list.count(); i++) { int row = index.row(); qDebug() << i << row << name; } }To copy to clipboard, switch view to plain text mode
Bookmarks