Important: Please read the Qt Code of Conduct -

TextInput frustration with the cursor

  • I'm trying to create the very simple and common behavior of a cursor appearing when you click inside a Text input box, and then disappearing after you press Enter.

    This is not so easy. I can get the cursor to disappear with this:

    @ onAccepted: {

    But then, when they click in it again, while they can edit, the cursor remains invisible. The cursorVisible property is supposed to be automatically set to true when the focus is active for Text Input, but this is not happening for me. So then I tried this:

    @ onActiveFocusChanged: {

    But unfortunately this does nothing.

    I then tried adding a Mouse Area to the Text Input such that when it is clicked, the cursor is made visible. This also failed to make the cursor appear and also had other bizarre side effects that prevented the cursor from being moved at all, or any editing inside the box to happen, for some reason.

    How hard can it be to just have a normal functioning text input box that users can understand and relate to?

Log in to reply