I really don't know anymore if is an event problem or what, because my code works "fine", i just have to click many times on a cell to get the correct value of (line, column).
I tried to change my code of post #11, i don't know if is what anda_skoa said, but i got the same problem. Nothing changed.

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