Now i'm getting another weird problem! Sorry bother you, guys! Is another problem, but with my QTableWidget, that's why i did'nt create another topic.

I'm trying to get the row and column number when i click in a certain cell, but to see the correct output, i have to click in the same line ten times, maybe more, then the output changes to the correct row number. Why this is happening? Whith the following code, i'm trying to get e correct line and column of a certain cell when click on it.

Qt Code:
  1. void Table::mousePressEvent(QMouseEvent *event) {
  2. if(event->button() == Qt::LeftButton) {
  3. cout << "(" << this->currentRow( ) << ", " << this->currentColumn( ) << ")" << endl;
  4. }
  5. }
To copy to clipboard, switch view to plain text mode 

Considering i promoted my QTableWidget to "TestEvt" which is derived from QTableWidget. I did that to reimplement "mousePressEvent()" in "TestEvt" class.