diff options
author | Paul Olav Tvete <paul.tvete@digia.com> | 2014-05-21 10:49:07 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-21 12:35:21 +0200 |
commit | 7c1ee572770bdac445eb6a647b6a82a7dc2da407 (patch) | |
tree | 23c52ce27a555eec3fe95a13146d08e28aea36b9 /src/quickwidgets/qquickwidget.cpp | |
parent | 7ccdf8d11675e963b70b565e421309e09c019343 (diff) |
Focus event fix for QQuickWidget
Relay focus in/out events to the offscreen QQuickWindow, and also
make the offscreen window believe it has the focus when the
render window has it.
Task-number: QTBUG-39033
Change-Id: Ib50b134e635833ad3813693ca272f04607c525b8
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src/quickwidgets/qquickwidget.cpp')
-rw-r--r-- | src/quickwidgets/qquickwidget.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp index e20e5f22ab..7e31c271f4 100644 --- a/src/quickwidgets/qquickwidget.cpp +++ b/src/quickwidgets/qquickwidget.cpp @@ -941,6 +941,20 @@ void QQuickWidget::wheelEvent(QWheelEvent *e) } #endif + +void QQuickWidget::focusInEvent(QFocusEvent * event) +{ + Q_D(QQuickWidget); + d->offscreenWindow->focusInEvent(event); +} + +void QQuickWidget::focusOutEvent(QFocusEvent * event) +{ + Q_D(QQuickWidget); + d->offscreenWindow->focusOutEvent(event); +} + + /*! \reimp */ bool QQuickWidget::event(QEvent *e) { |