diff options
author | Jan Arve Saether <jan-arve.saether@theqtcompany.com> | 2016-04-28 09:23:52 +0200 |
---|---|---|
committer | Jan Arve Sæther <jan-arve.saether@theqtcompany.com> | 2016-05-02 11:00:47 +0000 |
commit | 9c02a924cae9ca6ffc71da9e1fce02e94776944f (patch) | |
tree | 067dbd45453d3414526bc2feb99bf6abf079ebef /src/widgets/kernel | |
parent | 9180797247ebad855bf9713dd5574f9eef5296f2 (diff) |
Add Qt::ImInputItemClipRectangle support to widgets
Let widgets respond to ImInputItemClipRectangle inputMethodQuery and
notify about potential changes with QInputMethod::update()
Change-Id: I01b2c53273df207d26107b237a7096fe53d1b0a5
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 5826116a96..8d5f275d73 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -385,6 +385,7 @@ void QWidgetPrivate::updateWidgetTransform(QEvent *event) t.translate(p.x(), p.y()); QGuiApplication::inputMethod()->setInputItemTransform(t); QGuiApplication::inputMethod()->setInputItemRectangle(q->rect()); + QGuiApplication::inputMethod()->update(Qt::ImInputItemClipRectangle); } } @@ -9774,6 +9775,8 @@ QVariant QWidget::inputMethodQuery(Qt::InputMethodQuery query) const return inputMethodQuery(Qt::ImCursorPosition); case Qt::ImHints: return (int)inputMethodHints(); + case Qt::ImInputItemClipRectangle: + return d_func()->clipRect(); default: return QVariant(); } |