Allow the users to disable the text handles

The user can set QT_QPA_NO_TEXT_HANDLES to 1 to disable the text handles.

Change-Id: I974af4d79c86259288035fe20b6a9d0c6d047af8
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
bb10
BogDan Vatra 2017-11-28 14:56:02 +02:00
parent 495833b796
commit 280b8b79c0
1 changed files with 4 additions and 0 deletions

View File

@ -526,6 +526,10 @@ void QAndroidInputContext::updateCursorPosition()
void QAndroidInputContext::updateSelectionHandles()
{
static bool noHandles = qEnvironmentVariableIntValue("QT_QPA_NO_TEXT_HANDLES");
if (noHandles)
return;
auto im = qGuiApp->inputMethod();
if (!m_focusObject || (m_cursorHandleShown == CursorHandleNotShown)) {
// Hide the handles