I have a QTableView instance limited to a single row selection. I don’t want to care about what cell the user presses, but it should always extract the data in (selectedRow,0).
So far I am doing the following:
QModelIndexList indices = _ui->_tbl->selectionModel()->selection().indexes();
QModelIndex id = indices.at(0).sibling(indices.at(0).row(),0);
Is there a better way?
As stated in Qt doc concerning
currentIndex:So you can do it quicker :