diff options
| author | Piotr Mikolajczyk <[email protected]> | 2020-12-18 10:51:30 +0100 |
|---|---|---|
| committer | Ville Voutilainen <[email protected]> | 2021-03-05 07:57:14 +0000 |
| commit | 5c6b10c3cee5737dbc041d0463220898c8120807 (patch) | |
| tree | aec06989da84711fa432899f84cd0adba9323e82 /src/plugins/platforms/android/qandroidinputcontext.h | |
| parent | 9fb81fc28774cd4aa01a8b29d59150e1a7de8fd8 (diff) | |
Android: Place cursor correctly on screen when editing
When editing text the cursor is not placed correctly. So this
has been achieved by tricking Android into thinking that the
input area is only the line where the cursor is, so it is
forced to keep it on screen.
Fixes: QTBUG-91073
Pick-to: 5.15
Change-Id: Icc2e8315deb76ca1a84819d3fdceaa7b027b1174
Reviewed-by: Ville Voutilainen <[email protected]>
Diffstat (limited to 'src/plugins/platforms/android/qandroidinputcontext.h')
| -rw-r--r-- | src/plugins/platforms/android/qandroidinputcontext.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/android/qandroidinputcontext.h b/src/plugins/platforms/android/qandroidinputcontext.h index e9bfb98e66f..02a66c367a7 100644 --- a/src/plugins/platforms/android/qandroidinputcontext.h +++ b/src/plugins/platforms/android/qandroidinputcontext.h @@ -138,6 +138,7 @@ public: public slots: void safeCall(const std::function<void()> &func, Qt::ConnectionType conType = Qt::BlockingQueuedConnection); void updateCursorPosition(); + void updateInputItemRectangle(); void updateSelectionHandles(); void handleLocationChanged(int handleId, int x, int y); void touchDown(int x, int y); @@ -154,6 +155,7 @@ private: bool focusObjectIsComposing() const; void focusObjectStartComposing(); bool focusObjectStopComposing(); + QRect cursorRect(); private: ExtractedText m_extractedText; |
