Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Cursor visible even after focus is shifted to next text field and previous textfield's focus is made false

Cursor visible even after focus is shifted to next text field and previous textfield's focus is made false

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
4 Posts 3 Posters 820 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.
  • J Offline
    J Offline
    JasmineSethi
    wrote on last edited by JasmineSethi
    #1

    When i am testing my code in android device, i am getting UI as below;
    0_1542969082216_4f907c51-a359-4c02-a4fa-f76bee36a020-image.png
    Why this cursor symbol is visible in each text field even after jumping to next Textfield?
    In some other android devices its working fine. Cursor symbol is not visible after each input.
    For Desktop also its working fine.
    Why this is happening?

    My code looks like :
    Textfield{
    id: id_textfield1
    onTextChanged:
    {
    id_textfield2.focus = true
    id_textfield1.focus = false
    }
    }
    Textfield{
    id: id_textfield2
    onTextChanged:
    {
    id_textfield3.focus = true
    id_textfield2.focus = false
    }
    }

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mvuori
      wrote on last edited by
      #2

      Are you sure this works on any system? You are setting the focus on id_textfield1 etc..., but the fields have ids txt1 etc...

      It is not uncommon for some versions of Qt to have quirks with Android. (First thing to tell when discussing problems are the environment details: Qt version, Android version etc...) If you don't use a mature Qt version, like 5.something.1 or .2, I'd recommend trying with such.

      J 1 Reply Last reply
      0
      • M mvuori

        Are you sure this works on any system? You are setting the focus on id_textfield1 etc..., but the fields have ids txt1 etc...

        It is not uncommon for some versions of Qt to have quirks with Android. (First thing to tell when discussing problems are the environment details: Qt version, Android version etc...) If you don't use a mature Qt version, like 5.something.1 or .2, I'd recommend trying with such.

        J Offline
        J Offline
        JasmineSethi
        wrote on last edited by JasmineSethi
        #3

        @mvuori
        Sorry, that id written previously was a mistake. I updated that.
        I am using QT version 5.9

        1 Reply Last reply
        0
        • Y Offline
          Y Offline
          Yaswanth
          wrote on last edited by
          #4

          Did you try using forceActiveFocus() ?

          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