I have a QTableWidget, if a cell is clicked, I want to emit a signal to the MainWindow.
My Header File:
QTableWidget *myQtableWidget= new QTableWidget;
...
private slots:
void on_myTableWidgetWindow_cellClicked(int row, int column);
mainWindow.cpp (in the constructor of the mainWindow):
connect(this->myQtableWidget, SIGNAL(cellClicked(int row, int column)),
this, SLOT(on_myTableWidgetWindow_cellClicked(int row, int column)));
mainWindow.cpp (somewhere):
void mainWindow::on_myTableWidgetWindow_cellClicked(int row, int column)
{
//do something
}
The console output is:
QMetaObject::connectSlotsByName: No matching signal for on_myTableWidgetWindow_cellClicked(int,int)
QObject::connect: No such signal QTableWidget::cellClicked(int row, int column) in ..\myProg\windowMain.cpp:71
QObject::connect: (receiver name: 'mainWindow')
Why is the console telling me : "No such signal QTableWidget::cellClicked"? In the QT-Docs, this signal is listed: http://doc.qt.io/qt-5/qtablewidget.html#cellClicked
I can't see my mistake, can anyone help? best,