diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-10-30 11:54:24 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-10-30 11:56:11 (GMT) |
commit | 4e60cdcf222f607ccc49138035fb3d17140fee51 (patch) | |
tree | 387fac23c69f993e25b9f352065e95b966e2e081 | |
parent | 180e36e586437ffb751166f0088329ecbec3001e (diff) | |
download | Qt-4e60cdcf222f607ccc49138035fb3d17140fee51.zip Qt-4e60cdcf222f607ccc49138035fb3d17140fee51.tar.gz Qt-4e60cdcf222f607ccc49138035fb3d17140fee51.tar.bz2 |
Fixed keypad navigation in QFileDialog details view
Made it possible to navigate out of QFileDialog details view using
keypad navigation.
Task-number: QTBUG-4793
Reviewed-by: Alessandro Portale
-rw-r--r-- | src/gui/dialogs/qfiledialog.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp index eab842f..50823cd 100644 --- a/src/gui/dialogs/qfiledialog.cpp +++ b/src/gui/dialogs/qfiledialog.cpp @@ -3187,7 +3187,17 @@ void QFileDialogTreeView::keyPressEvent(QKeyEvent *e) if (!d_ptr->itemViewKeyboardEvent(e)) { QTreeView::keyPressEvent(e); } +#ifdef QT_KEYPAD_NAVIGATION + else if ((QApplication::navigationMode() == Qt::NavigationModeKeypadTabOrder + || QApplication::navigationMode() == Qt::NavigationModeKeypadDirectional) + && !hasEditFocus()) { + e->ignore(); + } else { + e->accept(); + } +#else e->accept(); +#endif } QSize QFileDialogTreeView::sizeHint() const |