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. I want to shield the keyboard,in android

I want to shield the keyboard,in android

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
6 Posts 2 Posters 1.7k 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.
  • T Offline
    T Offline
    THEFree
    wrote on last edited by
    #1

    i use qtquick to android

    i want to click textfield ,and shield the keyboard (Always hide the keyboard)

    My English is not good.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Schluchti
      wrote on last edited by
      #2

      Have you tried setting the TextField readOnly? This should prevent the virtual keyboard from showing up. If it's already visible you can hide it with Qt.inputMethod.hide()

      Want to read more about Qt?

      https://gympulsr.com/blog/qt/

      Latest Article: https://gympulsr.com/blog/qt/2017/06/14/ios-background-music-qt.html

      T 1 Reply Last reply
      0
      • S Schluchti

        Have you tried setting the TextField readOnly? This should prevent the virtual keyboard from showing up. If it's already visible you can hide it with Qt.inputMethod.hide()

        T Offline
        T Offline
        THEFree
        wrote on last edited by
        #3

        @Schluchti Qt.inputMethod.hide() ??? how to setting

        S 1 Reply Last reply
        0
        • T THEFree

          @Schluchti Qt.inputMethod.hide() ??? how to setting

          S Offline
          S Offline
          Schluchti
          wrote on last edited by
          #4

          @THEFree That's not a property and that only works if you want to hide the keyboard when it's already visible. The better approach would be to not show it in the first place. Have you tried the following?

          TextField{
              readOnly: true
          }
          

          Want to read more about Qt?

          https://gympulsr.com/blog/qt/

          Latest Article: https://gympulsr.com/blog/qt/2017/06/14/ios-background-music-qt.html

          T 1 Reply Last reply
          0
          • S Schluchti

            @THEFree That's not a property and that only works if you want to hide the keyboard when it's already visible. The better approach would be to not show it in the first place. Have you tried the following?

            TextField{
                readOnly: true
            }
            
            T Offline
            T Offline
            THEFree
            wrote on last edited by
            #5

            @Schluchti

            my phone have keyboard ,i want'to click textField .
            don't use android's keyboard ,use my keboard to inputing

            S 1 Reply Last reply
            0
            • T THEFree

              @Schluchti

              my phone have keyboard ,i want'to click textField .
              don't use android's keyboard ,use my keboard to inputing

              S Offline
              S Offline
              Schluchti
              wrote on last edited by
              #6

              @THEFree you could try this: http://stackoverflow.com/questions/31275870/disable-android-keyboard-in-qml-application

              Another possibility that might work would be to connect to the visibleChanged signal (see here [1]) and hide the keyboard again as soon as the keyboard gets visible.

              [1] http://doc.qt.io/qt-5/qinputmethod.html

              Want to read more about Qt?

              https://gympulsr.com/blog/qt/

              Latest Article: https://gympulsr.com/blog/qt/2017/06/14/ios-background-music-qt.html

              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