aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeqing Huang <deqing.huang@intel.com>2011-01-12 10:55:57 +0800
committerPekka Vuorela <pekka.ta.vuorela@nokia.com>2011-01-14 15:05:58 +0200
commiteebb2403a60a0b0f8853b02d43808764e994f442 (patch)
treef632008febe18b7edf6d41e8e1dc1e4d76e70395
parent809de335cd7e1b8c018c60cf25c76bf103ac140d (diff)
Changes: MTextEdit to support query for anchor position
RevBy: Pekka Vuorela
-rwxr-xr-xsrc/corelib/widgets/mtextedit.cpp5
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()) {