Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-20033

closeSoftwareInputPanel() method is not closing the VKB when applied on TextEdit and TextInput elements | sample code given at http://doc.qt.nokia.com/4.7/qml-textinput.html#closeSoftwareInputPanel-method link not working in this context

    XMLWordPrintable

Details

    • 5aef1b278488fb889e298ce858ae299b83edf5ed, 95df5be87b37da139dba33b06aaf6e2a251be698

    Description

      Hi,

      I have gone through the documentation http://doc.qt.nokia.com/4.7/qml-textinput.html#closeSoftwareInputPanel-method link and tried the sample snippet given there for using "openSoftwareInputPanel()" and "closeSoftwareInputPanel()". But i found that "closeSoftwareInputPanel()" method is not working (means not closing the VKB) when i triggered "onPressAndHold" signal handler. I am pasting the sample code here:

      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();
           }
       }
      

      I observed that VKB closes only when i add "textInput.focus = false" in the "onPressAndHold" handler. my modifications are as follows:

      onPressAndHold:

      { textInput.closeSoftwareInputPanel(); textInput.focus = false }

      So, it is clear that "closeSoftwareInputPanel()" is not working. So, it should work as documented, like it should close the VKB. If not, the documentation should be corrected.

      Thanks & Regards,
      BalaSubrahmanyam Varanasi

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            samimeri Sami Merila (Inactive)
            baluvaranasi BalaSubrahmanyam Varanasi
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes