summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-08-19 14:11:14 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-08-21 01:28:26 +0200
commit62572f0a18af401f778875569eac9203f0d69f89 (patch)
treeb3ec2661c69fa230a371f47c6f27a36b305a1894 /src/corelib/global
parentb963888b1c7ff01f0815752c4212808ee8ecf244 (diff)
Add note about ImCursorPosition/ImAbsolutePosition not including preedit
The cursor position as reflected by these two properties is not affected by the offset of the cursor in the preedit area. That means that when composing text, the cursor position stays the same, at the preedit insertion point, regardless of where the cursor is positioned within the preedit string by the QInputMethodEvent::Cursor attribute. Pick-to: 6.2 Change-Id: Ic2584369f92271e3f242d51f2e647f6f05c72d53 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qnamespace.qdoc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index 0ad279f16c..1a682732f9 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -2659,7 +2659,8 @@
\value ImCursorRectangle The rectangle covering the area of the input cursor in widget coordinates.
\value ImFont The currently used font for text input.
\value ImCursorPosition The logical position of the cursor within the text surrounding the input area
- (see \c ImSurroundingText).
+ (see \c ImSurroundingText). The position does not incorporate the offset of
+ the cursor within the preedit area, as controlled by QInputMethodEvent::Cursor.
\value ImSurroundingText The plain text around the input area, for example the current paragraph.
\value ImCurrentSelection The currently selected text.
\value ImMaximumTextLength The maximum number of characters that the widget can hold. If there is no limit,
@@ -2670,7 +2671,9 @@
\value ImHints The hints for input method on expected input. (See Qt::InputMethodHints)
\value ImPreferredLanguage The preferred input language.
\value ImPlatformData Platform specific data for input method.
- \value ImAbsolutePosition The logical position of the cursor within the entire document.
+ \value ImAbsolutePosition The logical position of the cursor within the entire document. The position does
+ not incorporate the offset of the cursor within the preedit area, as controlled
+ by QInputMethodEvent::Cursor.
\value ImTextBeforeCursor The plain text before the cursor. The widget can decide how much text to return,
but \b{must} not return an empty string unless the cursor is at the start of the document.
\value ImTextAfterCursor The plain text after the cursor. The widget can decide how much text to return,