How to get a slot when a row of a QTableWidget is clicked ?
Solved
General and Desktop
-
Hi,
You should check the QHeaderView::sectionClicked signal.
-
@cxam
hi
in mainwin.hclass MainWindow : public QMainWindow {... public slots: void sectionClicked(int); ... define slot hook it up ( in mainwin constructor) connect( ui->tableWidget->verticalHeader(), &QHeaderView::sectionClicked , this, &MainWindow::sectionClicked); - in .cpp void MainWindow::sectionClicked(int index) { qDebug() << "row sel:" << index; }