Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. TextInput frustration with the cursor
Forum Updated to NodeBB v4.3 + New Features

TextInput frustration with the cursor

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 597 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    qttester5
    wrote on last edited by
    #1

    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: {
    cursorVisible=false
    }@

    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: {
    cursorVisible=true
    }
    @

    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?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved