Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Virutal Keyboard

Virutal Keyboard

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 3 Posters 2.5k 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.
  • Gianluca86G Offline
    Gianluca86G Offline
    Gianluca86
    wrote on last edited by
    #1

    Hi,
    I am developing cross application (Windows and Linux) that can be installed on computers with touch screen.
    I so need to create a virtual keyboard. But the only examples that I found they taking the focus only from the parent widget, but when I try to edit tables (lose focus as soon as I click on a button), and especially when using the QFileDialog (is modal) the keyboard is unusable.
    I need a keyboard similar to that of windows, are there some examples?
    There are other better ways?
    Thank you

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      Are you using QtWidgets or QtQuick?

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      0
      • Gianluca86G Offline
        Gianluca86G Offline
        Gianluca86
        wrote on last edited by
        #3

        I'm using QtWidgets.

        J.HilkJ 1 Reply Last reply
        0
        • Gianluca86G Gianluca86

          I'm using QtWidgets.

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #4

          @Gianluca86
          any reason why you don't use

          Qt Virtual Keyboard used to be commercial licenz only but that changed with the last update, same as QChart


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          1 Reply Last reply
          0
          • Gianluca86G Offline
            Gianluca86G Offline
            Gianluca86
            wrote on last edited by
            #5

            @J-Hilk : In linux I use the 5.5.1 version that does not have the Qt Virtual Keyboard, even in Windows that use the 5.7.0 is not present. I downloaded it from the website and now try to see how it works.
            Question: It works well on desktops? Reading quickly seems more made for mobile than for a desktop application.

            J.HilkJ 1 Reply Last reply
            0
            • Gianluca86G Gianluca86

              @J-Hilk : In linux I use the 5.5.1 version that does not have the Qt Virtual Keyboard, even in Windows that use the 5.7.0 is not present. I downloaded it from the website and now try to see how it works.
              Question: It works well on desktops? Reading quickly seems more made for mobile than for a desktop application.

              J.HilkJ Offline
              J.HilkJ Offline
              J.Hilk
              Moderators
              wrote on last edited by
              #6

              @Gianluca86
              Sadly I have no Idea, so far I had no need for an custom Virtual Keyboard. Usually I use the one the OS-provides or a hardware one :)

              But I don't see why it shouldn't work on desktops.


              Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


              Q: What's that?
              A: It's blue light.
              Q: What does it do?
              A: It turns blue.

              1 Reply Last reply
              0
              • Gianluca86G Offline
                Gianluca86G Offline
                Gianluca86
                wrote on last edited by
                #7

                I'm trying to use, unfortunately, I don't understand how insert in my project and how to customize it. I'm using QTWidgets and C ++, not QML or QtQuick, and I find only examples in QML. In the documentation it says that it works on C ++.

                1 Reply Last reply
                0
                • VRoninV Offline
                  VRoninV Offline
                  VRonin
                  wrote on last edited by
                  #8

                  Yep Qt Virtual Keyboard is QML only, hence my question above.

                  You could try something like http://doc.qt.io/qt-4.8/qt-tools-inputpanel-example.html but it's almost impossible to internationalise

                  "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                  ~Napoleon Bonaparte

                  On a crusade to banish setIndexWidget() from the holy land of Qt

                  1 Reply Last reply
                  0
                  • Gianluca86G Offline
                    Gianluca86G Offline
                    Gianluca86
                    wrote on last edited by
                    #9

                    Ok, so I need to use my old keyboard.
                    My original problem is the focus

                    VirtualKeyboard *pVirtKey = new VirtualKeyboard(this);
                    ...
                    
                    // VirtualKeyboard.cpp
                    ...
                    QApplication::sendEvent(m_pParent->focusWidget(), &keyEventIns);
                    ...
                    

                    In this way from its parent (for example QMainWindow) I take the object that has the focus. I would not use this method but simply take the focus of the selected object, not passing a parent, Can I do this?

                    I modify this projet
                    WidgetKeyboard

                    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