diff options
author | Deqing Huang <deqing.huang@intel.com> | 2011-01-12 10:55:57 +0800 |
---|---|---|
committer | Pekka Vuorela <pekka.ta.vuorela@nokia.com> | 2011-01-14 15:05:58 +0200 |
commit | eebb2403a60a0b0f8853b02d43808764e994f442 (patch) | |
tree | f632008febe18b7edf6d41e8e1dc1e4d76e70395 | |
parent | 809de335cd7e1b8c018c60cf25c76bf103ac140d (diff) |
Changes: MTextEdit to support query for anchor position
RevBy: Pekka Vuorela
-rwxr-xr-x | src/corelib/widgets/mtextedit.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/widgets/mtextedit.cpp b/src/corelib/widgets/mtextedit.cpp index 2cc0eca7..7d4a44b9 100755 --- a/src/corelib/widgets/mtextedit.cpp +++ b/src/corelib/widgets/mtextedit.cpp @@ -2586,6 +2586,11 @@ QVariant MTextEdit::inputMethodQuery(Qt::InputMethodQuery query) const return QVariant(pos); } + case Qt::ImAnchorPosition: { + int pos = d->cursor()->anchor() - block.position(); + return QVariant(pos); + } + case Qt::ImSurroundingText: { QString surroundingText = block.text(); if (d->isPreediting()) { |