문제

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.

도움이 되었습니까?

해결책

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)));
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top