Check out example codes for "qtableview get selected row". It will help you in understanding the concepts better.

Code Example 1

QModelIndexList indexList = yourTableView->selectionModel()->selectedIndexes();
int row;
foreach (QModelIndex index, indexList) {
    row = index.row();
    ....
}

Learn ReactJs, React Native from akashmittal.com