diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2009-11-13 15:56:21 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2009-11-13 15:58:43 (GMT) |
commit | 851814cfedd678bfdf019eeafecd085b9df9058f (patch) | |
tree | 96dd9fbde0f0280677684b2dbb1e7f012129c76f /src/gui/kernel/qwidget_p.h | |
parent | ead0ab9e14603f278fcaaf4f126cdd232274fe26 (diff) | |
download | Qt-851814cfedd678bfdf019eeafecd085b9df9058f.zip Qt-851814cfedd678bfdf019eeafecd085b9df9058f.tar.gz Qt-851814cfedd678bfdf019eeafecd085b9df9058f.tar.bz2 |
Fix input method support on widgets that have a focus proxy set.
When enabling/disabling a widget or changing its InputMethodEnabled attribute,
use the focus proxy widget's input context for reset and for setting the focus
widget on the input context.
Task-number: QTBUG-5781
Reviewed-by: Denis
Diffstat (limited to 'src/gui/kernel/qwidget_p.h')
-rw-r--r-- | src/gui/kernel/qwidget_p.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h index eea929b..66efcb5 100644 --- a/src/gui/kernel/qwidget_p.h +++ b/src/gui/kernel/qwidget_p.h @@ -465,6 +465,12 @@ public: void setLayoutItemMargins(QStyle::SubElement element, const QStyleOption *opt = 0); QInputContext *inputContext() const; + inline QWidget *effectiveFocusWidget() { + QWidget *w = q_func(); + while (w->focusProxy()) + w = w->focusProxy(); + return w; + } void setModal_sys(); |