Make it possible to jump between filters by pressing the tab key

Allow jumping between the filter input fields by pressing Tab and
Shift+Tab.

See issue #106.
This commit is contained in:
Martin Kleusberg
2014-10-11 15:43:39 +02:00
parent 017715510f
commit eb8e801b57
3 changed files with 40 additions and 6 deletions

View File

@@ -67,8 +67,8 @@ void ExtendedTableWidget::keyPressEvent(QKeyEvent* event)
// Call a custom copy method when Ctrl-C is pressed
if(event->matches(QKeySequence::Copy))
copy();
else
QTableView::keyPressEvent(event);
else if((event->key() != Qt::Key_Tab && event->key() != Qt::Key_Backtab) || hasFocus()) // This prevents the current selection from being changed when pressing
QTableView::keyPressEvent(event); // tab to move to the next filter
}
void ExtendedTableWidget::updateGeometries()