summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qwidgetlinecontrol_p.h
diff options
context:
space:
mode:
authorPiotr Mikolajczyk <piotr.mikolajczyk@qt.io>2021-02-25 15:36:29 +0100
committerPiotr Mikolajczyk <piotr.mikolajczyk@qt.io>2021-03-30 10:35:59 +0200
commitc80f262258b7846bf199887bcfdbb6dcfda6ad6f (patch)
tree509ec5a3dde42db3af4fa29f6a1fe7f154f85e98 /src/widgets/widgets/qwidgetlinecontrol_p.h
parent9275edbc31a0ca83740df5b4450b7776c59012dc (diff)
Android: Add select and copy capability to read-only text widgets
In case of a read-only text editing widget it was imposibble to copy text from it. In QtWidgets you could not even see the selection handless. Text selection in QtWidgets module was filtered depending on readOnly property of the widget. Additionally, in InputMethod the read-only state was translated into disabled. Patch also makes the edit menu to be aware of the read-only status of the control - the menu items are different for rw and ro controls. Task-number: QTBUG-91417 Change-Id: Ic7b27f78678eeaa87a38607af787f254db1383b8 Reviewed-by: Rami Potinkara <rami.potinkara@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Diffstat (limited to 'src/widgets/widgets/qwidgetlinecontrol_p.h')
-rw-r--r--src/widgets/widgets/qwidgetlinecontrol_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/widgets/widgets/qwidgetlinecontrol_p.h b/src/widgets/widgets/qwidgetlinecontrol_p.h
index f906165c20..bb24fe4d5b 100644
--- a/src/widgets/widgets/qwidgetlinecontrol_p.h
+++ b/src/widgets/widgets/qwidgetlinecontrol_p.h
@@ -164,6 +164,9 @@ public:
int selectionStart() const { return hasSelectedText() ? m_selstart : -1; }
int selectionEnd() const { return hasSelectedText() ? m_selend : -1; }
+#if defined (Q_OS_ANDROID)
+ bool isSelectableByMouse() const { return true; }
+#endif
bool inSelection(int x) const
{
if (m_selstart >= m_selend)