diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2009-05-20 13:47:58 (GMT) |
---|---|---|
committer | Kai Koehne <kai.koehne@nokia.com> | 2009-05-20 13:47:58 (GMT) |
commit | f6b9e75f3f7fd7bdef3855dd07ffdc9fa10b2dae (patch) | |
tree | 4c10a0cf69cb4033e8286f6006d2e6afa10338af /src/declarative/fx/qfxtextedit.cpp | |
parent | 1af763ed729ff5ee8847963a6a5e6774e108a4b7 (diff) | |
download | Qt-f6b9e75f3f7fd7bdef3855dd07ffdc9fa10b2dae.zip Qt-f6b9e75f3f7fd7bdef3855dd07ffdc9fa10b2dae.tar.gz Qt-f6b9e75f3f7fd7bdef3855dd07ffdc9fa10b2dae.tar.bz2 |
Pass ShortcutOverride event through SimpleCanvas to QFxTextEdit
In Bauhaus we have a global shortcut associated with the Del key.
This prevents the global shortcut from capturing the Del key while
editing in a text edit field.
Diffstat (limited to 'src/declarative/fx/qfxtextedit.cpp')
-rw-r--r-- | src/declarative/fx/qfxtextedit.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/declarative/fx/qfxtextedit.cpp b/src/declarative/fx/qfxtextedit.cpp index 8667c9e..b2da051 100644 --- a/src/declarative/fx/qfxtextedit.cpp +++ b/src/declarative/fx/qfxtextedit.cpp @@ -616,6 +616,20 @@ void QFxTextEdit::moveCursor(QTextCursor::MoveOperation operation, QTextCursor:: /*! \overload +Handles the given \a event. +*/ +bool QFxTextEdit::event(QEvent *event) +{ + Q_D(QFxTextEdit); + if (event->type() == QEvent::ShortcutOverride) { + d->control->processEvent(event, QPointF(0, 0)); + return true; + } + return QFxPaintedItem::event(event); +} + +/*! +\overload Handles the given key \a event. */ void QFxTextEdit::keyPressEvent(QKeyEvent *event) |