Hello,

I have a QTableWidget based class with an reimplemented keyPressEvent(...) method.

Unfortunately the window that holds the tableWidget does not react on the Tab-key any more (catchword: tab order). the tab order works as long as the tableWidget is not reached. As soon as the tabWidget has the focus the Tab-key only switches from one table cell to the next.
The tab order of the parent widget is "stopped" in from this moment on.

How can I make the tabWidget ignore the Tab-key and leave it to the surrounding widget that hold the tabWidget?

My implementation of the keyPressEvent(). No magic so far:
Qt Code:
  1. void MyTableWidget::keyPressEvent( QKeyEvent* event )
  2. {
  3. switch( event->key() )
  4. {
  5. case Qt::Key_Home:
  6. setCurrentCell(0, 0);
  7. break;
  8. default:
  9. QTableWidget::keyPressEvent(event);
  10. break;
  11. }
  12. }
To copy to clipboard, switch view to plain text mode