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. Qt5.4.1 Virtual Keyboard not working
QtWS25 Last Chance

Qt5.4.1 Virtual Keyboard not working

Scheduled Pinned Locked Moved Mobile and Embedded
virtual keyboarqmlembedded linux
4 Posts 2 Posters 4.0k 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
    cachance
    wrote on 21 Apr 2015, 16:03 last edited by
    #1

    I'm trying to use the Virtual Keyboard from enterprise addons in a QML app but am having trouble making it work. I added the QT_IM_MODULE=qtvirtualkeyboard env variable and an InputPanel as shown in the example included with the module. Focusing on a TextInput does not bring up the keyboard. Qt.inputMethod.show()/hide() do not seem to affect the visibility of the keyboard; Qt.inputMethod.isVisible is always false. Forcing the InputPanel visible and clicking on keys results in the following console output "DeclarativeInputContext::::sendKeyClick(): <keyCode> no focus".

    Any suggestions? I'm out of ideas at this point.

    1 Reply Last reply
    0
    • P Offline
      P Offline
      PSI_lbc
      wrote on 24 Apr 2015, 21:19 last edited by
      #2

      Focusing on a TextInput does not bring up the keyboard if the project "kit" is for the "Desktop".

      Does the issue happen if you run on a simulator or actual device?

      In the QApplication Class there is something called: "autoSipEnabled : bool"
      This property holds toggles automatic SIP (software input panel) visibility.

      Set this property to true to automatically display the SIP when entering widgets that accept keyboard input. This property only affects widgets with the WA_InputMethodEnabled attribute set, and is typically used to launch a virtual keyboard on devices which have very few or no keys.

      The property only has an effect on platforms which use software input panels, such as Windows CE.

      The default is platform dependent.

      C 1 Reply Last reply 27 Apr 2015, 21:53
      0
      • P PSI_lbc
        24 Apr 2015, 21:19

        Focusing on a TextInput does not bring up the keyboard if the project "kit" is for the "Desktop".

        Does the issue happen if you run on a simulator or actual device?

        In the QApplication Class there is something called: "autoSipEnabled : bool"
        This property holds toggles automatic SIP (software input panel) visibility.

        Set this property to true to automatically display the SIP when entering widgets that accept keyboard input. This property only affects widgets with the WA_InputMethodEnabled attribute set, and is typically used to launch a virtual keyboard on devices which have very few or no keys.

        The property only has an effect on platforms which use software input panels, such as Windows CE.

        The default is platform dependent.

        C Offline
        C Offline
        cachance
        wrote on 27 Apr 2015, 21:53 last edited by
        #3

        @PSI_lbc Thanks for response.

        This behavior occurs while testing the app on an embedded Linux system. Setting "autoSipEnabled" didn't seem to help.

        One additional piece of information: while debugging the app on the device with a mouse plugged in (there will be only touch input in production environment) if I right click on a textfield to bring up a context menu, the keyboard appears and seems to work correctly from then on. If nothing else, can I programmatically simulate this right-click behavior to work around the situation?

        1 Reply Last reply
        0
        • C Offline
          C Offline
          cachance
          wrote on 28 Apr 2015, 21:06 last edited by
          #4

          Another finding --
          If in my main.cpp I create a QMessageBox and call exec() on it before calling exec() on my application, the virtual keyboard works.

          1 Reply Last reply
          0

          2/4

          24 Apr 2015, 21:19

          • Login

          • Login or register to search.
          2 out of 4
          • First post
            2/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved