Hi.,
i am new QT. i am using QTableView to display the Data.
if any cell clicked, then i need to call the event to display the row number in QMessageBox.
which event i need to use, and how to call the event?
please help me to fix the problem.
Hi.,
i am new QT. i am using QTableView to display the Data.
if any cell clicked, then i need to call the event to display the row number in QMessageBox.
which event i need to use, and how to call the event?
please help me to fix the problem.
Override QTableView::currentChanged(). The row number is then available with row() from the QModelIndex object passed to currentChanged().
You may also want to override selectionChanged(). From there you can get a QList of QModelIndex objects through QItemSelection::indexes().