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. Virtual keyboard when input text has focus
Forum Updated to NodeBB v4.3 + New Features

Virtual keyboard when input text has focus

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 4 Posters 6.1k 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.
  • Q Offline
    Q Offline
    qtnext
    wrote on last edited by
    #1

    Hi,

    I have an application build in Qml using a touchscreen. I need to implement a virtual keyboard visible only when the user need focus : for example in a search field of a qml webview. It seems that there a virtual keyboard in the colibri lib. But How do I detect that for example a webview need a keyboard and hide after typing ?

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kyleplattner
      wrote on last edited by
      #2

      Have you tried:

      @import QtQuick 1.0
      TextInput {
      id: textInput
      text: "Hello world!"
      activeFocusOnPress: false
      MouseArea {
      anchors.fill: parent
      onClicked: {
      if (!textInput.activeFocus) {
      textInput.forceActiveFocus()
      textInput.openSoftwareInputPanel();
      } else {
      textInput.focus = false;
      }
      }
      onPressAndHold: textInput.closeSoftwareInputPanel();
      }
      }@

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rodrigob
        wrote on last edited by
        #3

        How can you make this work on a desktop computer, running under GNOME for instance ?

        1 Reply Last reply
        0
        • M Offline
          M Offline
          martini
          wrote on last edited by
          #4

          There is now a Virtual Keyboard component for Qt Enterprise. But works only for X11 or Android for now, though Windows support is planned.

          http://blog.qt.digia.com/blog/2014/02/04/new-virtual-keyboard-for-qt-enterprise/

          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