Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QTableView get the correct index
-
Hi!
Trying to get the correct index in QTableView
If I do this:tableViewTab3Hosts.currentIndex()
it outputs table rows, but the model row starts with 2 instead of 1. How do I get exactly the model string, even if they are not consecutive?
For the table I use QAbstractTableModel placed in QSortFilterProxyModel
-
@Mikeeeeee
When dealing with indexes andQSortFilterProxyModel
you must deal with mapping between the proxy and the underlying model. https://doc.qt.io/qt-5/qsortfilterproxymodel.html#mapFromSource & https://doc.qt.io/qt-5/qsortfilterproxymodel.html#mapToSource. etc. Is this connected to your issue?