Reading indexes in QStandardItemModel
-
Hi!
U should use indexAt(QPoint), rowAt(int) and columnAt(int) inside overriden mousePressEvent or mouseReleaseEvent methodes. Cooridnates can be obtained from the Event class. -
the view emits a signal with what you want already, you just need to connect it:
QAbstractItemView::clicked(const QModelIndex &index) -
You can ask the model
http://doc.qt.io/qt-5/qstandarditemmodel.html#itemFromIndex