hI jpn!
I cant see where should i use index.row(); ?
It's a great pity that QTableView has not a function for that
for count selected rows work:
QModelIndexList indexes = ui.tableView->selectionModel()->selection().indexes();
for (int i = 0; i < indexes.count(); ++i)
{
}
QModelIndexList indexes = ui.tableView->selectionModel()->selection().indexes();
for (int i = 0; i < indexes.count(); ++i)
{
QModelIndex index = indexes.at(i);
QMessageBox::information(this,"", QString::number(i));
}
To copy to clipboard, switch view to plain text mode
Bookmarks