summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidgetwindow.cpp
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@theqtcompany.com>2014-12-10 15:07:00 +0100
committerPaul Olav Tvete <paul.tvete@theqtcompany.com>2014-12-10 15:56:47 +0100
commite79cdd0e6df7dec2edaea13b6cff45965c3e7456 (patch)
tree04d1847c4a07dcad9ddc6aa5e187dd15c2946322 /src/widgets/kernel/qwidgetwindow.cpp
parent6a7ee92b3958e3a3ebc16be15f8bd34217ec7bd2 (diff)
Enable input methods for QQuickWidget
Make it possible for widgets to have non-widget focus objects. Since we cannot add new virtual functions due to binary compatibility, we have to do it in QWidgetPrivate. Task-number: QTBUG-42677 Change-Id: I5f74daed2793c1c149bbe02e54ff2f7e2ad1af9e Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Diffstat (limited to 'src/widgets/kernel/qwidgetwindow.cpp')
-rw-r--r--src/widgets/kernel/qwidgetwindow.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp
index 463eea4ddc..b31f9a51dd 100644
--- a/src/widgets/kernel/qwidgetwindow.cpp
+++ b/src/widgets/kernel/qwidgetwindow.cpp
@@ -147,6 +147,12 @@ QObject *QWidgetWindow::focusObject() const
if (!widget)
widget = m_widget;
+ if (widget) {
+ QObject *focusObj = QWidgetPrivate::get(widget)->focusObject();
+ if (focusObj)
+ return focusObj;
+ }
+
return widget;
}