I want a signal to be emitted when I either click on a cell or use the arrow keys to navigate to a new cell of a QTableView. When I was using a QTableWidget, I used the currentCellChanged signals. However, I don’t see a similar signal in QTableView – is there nothing similar?
Thanks,
David
You can either use:
currentChanged(QModelIndex, QModelIndex)of theQItemSelectionModelinstance returned byQAbstractItemView::selectionModel(), orQAbstractItemView::currentChanged(QModelIndex, QModelIndex).PS: When the parameter is a const reference (so not
constalone, or not&alone), you can omit bothconstand&in theSIGNALandSLOTmacros: