I am using Qt TableWidgets and I am trying to fetch the current row and column whatever is selected by user.



I am using cellClicked SIGNAL of QTableWidget


Qt Code:
  1. connect(ui->tableWidget, SIGNAL(cellClicked(int,int)), this, SLOT(removeSR(int r,int c)));
To copy to clipboard, switch view to plain text mode 

Through this function removeSR(int r,int c) I am trying to fetch the current row and column but it does not display the value of current row and column.


Please send me the snippets of the code or any another way if possible.