diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-01-14 10:22:12 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-14 13:55:35 +0100 |
commit | 0721eb1ea53e6238cf8555424c2e3464ac3db0f6 (patch) | |
tree | ae64568a0b605d233144e38eaafb2d4a67c8fd57 /src | |
parent | 5558c55de88b42ecb8a1016e1544bae4104a24fd (diff) |
Filter key press events through shortcut map.
This allows QQuickItems to use shortcuts.
Change-Id: I068109a954d92e4e7bd5e63d2b3523b66855c60a
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/items/qquickwindow.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index 2cde3cc434..eb3a74f62f 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -1166,6 +1166,12 @@ void QQuickWindow::keyPressEvent(QKeyEvent *e) { Q_D(QQuickWindow); +#ifndef QT_NO_SHORTCUT + // Try looking for a Shortcut before sending key events + if (QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(this, e)) + return; +#endif + if (d->activeFocusItem) sendEvent(d->activeFocusItem, e); } |