Search code examples
c++qttouchscreen

How to stop a temporary cursor from showing up when touching QLineEdit?


On a touch screen application, there are various Textboxes (QLineEdits). The mouse/cursor is hidden, however the problem is that touching with a finger to focus on the texbox will show a temporary cursor. Note this is NOT the blinking cursor that sits in the textbox. It seems to be the actual mouse cursor that temporarily appears but then disappears after a few seconds. Is there a way to prevent that temporary cursor from appearing?


Solution

  • Jeremy's answer worked for me.

    QGuiApplication::setOverrideCursor(Qt::BlankCursor);