How to hide selection handles on QtQuickControls2 TextField?

384 Views Asked by At

I use QtVirtualKeyboard in my QML app and as a result selection handles appear whenever some text is selected in a TextField:

enter image description here

Is there any way to hide these handles? Nothing in TextField or TextInput docs mention anything about this.

1

There are 1 best solutions below

1
On BEST ANSWER

You can hide the handle by setting the InputMethodHint flag in the TextField to Qt.ImhNoTextHandles. That should get rid of the handle. ref https://doc.qt.io/qt-5/qt.html