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. working with TextInput{}

working with TextInput{}

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 270 Views
  • 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.
  • C Offline
    C Offline
    Circuits
    wrote on last edited by Circuits
    #1

    I was browsing the docs on TextInput{} and I am a bit confused by something. There seems to me to be a clickable area but there is no onClicked property. I would like to setup the TextInput{} s/t when a user clicks inside the box, instead of placing the cursor, it highlights the whole string. Is that possible?

    1 Reply Last reply
    0
    • IntruderExcluderI Offline
      IntruderExcluderI Offline
      IntruderExcluder
      wrote on last edited by
      #2
      TextInput {
          ...
          onActiveFocusChanged: {
              if (activeFocus) {
                  selectAll();
              }
          }
      }
      
      1 Reply Last reply
      3
      • C Offline
        C Offline
        Circuits
        wrote on last edited by
        #3

        Perfect, thank you.

        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