Rakesh K
Rakesh K

Reputation: 8505

QTableWidget cellClicked signal not working

I have a QTableWidget in my application and I have connected the cellClicked(int,int) signal to a slot. But this code in the slot doesn't get called at all when a cell is clicked. Please let me know how this can be resolved. This is my code:

connect(ui.tableWidget, SIGNAL(cellClicked(x,y)), this, SLOT(myCellClicked(x,y)));

Thanks, Rakesh.

Upvotes: 0

Views: 2002

Answers (1)

alexisdm
alexisdm

Reputation: 29886

The SIGNAL and SLOT macros only handle type names, not variable names, so it should be:

connect(ui.tableWidget, SIGNAL(cellClicked(int,int)), this, SLOT(myCellClicked(int,int)));

Upvotes: 1

Related Questions