Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Select rows and columns in table view
I created a table model by sub-classing QStandardItemModel and I used QTableView to create the view.
I want to get the appropriate row and column selected, when I click a cell in the table view. For example, if I select the cell (2,2) I must get the second row and the second column selected.
franku last edited by
Someting like "this":http://qt-project.org/doc/qt-4.8/qtableview.html ?
See the comment at the bottom of the page.
The problem is not how to be notified when a selection occurs or how to get the selected indexes.
The problem is how to make an index's (QModelIndex) appropriate row and column selected !
The example is at : http://www.iissam.com/sources/codes.php (AHP method)
115 QModelIndex selection = m_matrixView->currentIndex();
116 int row = selection.row();
DaFranzl last edited by
I know you super DaFranzl ...
you welcome :)