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:
void MyTableWidget
::keyPressEvent( QKeyEvent* event
) {
switch( event->key() )
{
case Qt::Key_Home:
setCurrentCell(0, 0);
break;
default:
break;
}
}
void MyTableWidget::keyPressEvent( QKeyEvent* event )
{
switch( event->key() )
{
case Qt::Key_Home:
setCurrentCell(0, 0);
break;
default:
QTableWidget::keyPressEvent(event);
break;
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks