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. How to use Qt Virtualkeyboard in my QML program?
Forum Updated to NodeBB v4.3 + New Features

How to use Qt Virtualkeyboard in my QML program?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
9 Posts 3 Posters 1.8k Views 3 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.
  • M Offline
    M Offline
    MAthias_Va
    wrote on last edited by MAthias_Va
    #1

    Is there is any tutorial or step by step method! I am using Qt5.10 on Linux, and I need the keyboard for raspberry application!

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

      Till this moment I coudn't find a helpful tips, I had to create my own keypad to let the user add numbers as temporary solution,

      but still I hope if any one can help !

      raven-worxR 1 Reply Last reply
      0
      • M MAthias_Va

        Till this moment I coudn't find a helpful tips, I had to create my own keypad to let the user add numbers as temporary solution,

        but still I hope if any one can help !

        raven-worxR Offline
        raven-worxR Offline
        raven-worx
        Moderators
        wrote on last edited by raven-worx
        #3

        @MAthias_Va
        may be a stupid question, but did you look at the docs yet?!
        Also you should tell what you've done so far or what happens in your application. Otherwise i can only tell what you could also look up in the docs.

        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
        If you have a question please use the forum so others can benefit from the solution in the future

        M 1 Reply Last reply
        0
        • raven-worxR raven-worx

          @MAthias_Va
          may be a stupid question, but did you look at the docs yet?!
          Also you should tell what you've done so far or what happens in your application. Otherwise i can only tell what you could also look up in the docs.

          M Offline
          M Offline
          MAthias_Va
          wrote on last edited by MAthias_Va
          #4

          Yes @raven-worx I went through this document several times, but it is pretty tough to apply for me as a beginner,

          What I could do from the doc; I was able just to run the built in Qt example!

          What I need to do: I need a numeric Keypad pops up when the user try to enter text!

          But I understand I need to build the Keyboard in my application, I can see the Build Instructions , but I don't know where to write it and so on!

          raven-worxR 1 Reply Last reply
          0
          • M MAthias_Va

            Yes @raven-worx I went through this document several times, but it is pretty tough to apply for me as a beginner,

            What I could do from the doc; I was able just to run the built in Qt example!

            What I need to do: I need a numeric Keypad pops up when the user try to enter text!

            But I understand I need to build the Keyboard in my application, I can see the Build Instructions , but I don't know where to write it and so on!

            raven-worxR Offline
            raven-worxR Offline
            raven-worx
            Moderators
            wrote on last edited by raven-worx
            #5

            @MAthias_Va
            k here is a quick overview:

            1. no need to compile anything (unless you know why). The QtVirtualKeyboard module can be downloaded from the installer
            2. add qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard")); at the very beginning of your main()
            3. Place a InputPanel QML element where you want the keyboard to appear
            4. In QML use a TextField, TextInput, etc. element and set it's inputMethodHints property to Qt.ImhDigitsOnly

            --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
            If you have a question please use the forum so others can benefit from the solution in the future

            1 Reply Last reply
            2
            • M Offline
              M Offline
              MAthias_Va
              wrote on last edited by MAthias_Va
              #6

              @raven-worx

              Woow this is so easy, Once I added line 2 in the very beginning of main, I can see the Keyboard, but the weird thing is it launched in my program on start up-without calling it-, and transparent as you see in the picture below;

              1 Reply Last reply
              0
              • M Offline
                M Offline
                MAthias_Va
                wrote on last edited by
                #7

                I see I should add

                disable-desktop|android-embedded|!isEmpty(CROSS_COMPILE)|qnx {
                   DEFINES += MAIN_QML=\\\"basic-b2qt.qml\\\"
                } else {
                   DEFINES += MAIN_QML=\\\"Basic.qml\\\"
                }
                

                in my .pro file! should it be at the end of page! is it matter here! I need it for raspberry, should I delete (disable-desktop) or keep it!

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  MAthias_Va
                  wrote on last edited by
                  #8

                  @raven-worx , finally I get it, I forget to do step 3

                  Pablo J. RoginaP 1 Reply Last reply
                  0
                  • M MAthias_Va

                    @raven-worx , finally I get it, I forget to do step 3

                    Pablo J. RoginaP Offline
                    Pablo J. RoginaP Offline
                    Pablo J. Rogina
                    wrote on last edited by
                    #9

                    @MAthias_Va if your issue is solved, please mark your post as such! Thanks.

                    Upvote the answer(s) that helped you solve the issue
                    Use "Topic Tools" button to mark your post as Solved
                    Add screenshots via postimage.org
                    Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                    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