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

Different inputMethodHints on TextField component

    XMLWordPrintable

Details

    • Android

    Description

      If we have for example, two QML components ( Login.qml, Profile.qml ) and they have a TextField component with a different definition of inputMethodHints then an error comes up. 

      Suppose our first component after app load is Login.qml and it has two TextField with different inputMethodHints. 

      Login.qml
       

      TextField {
         id: inputFieldUsername
             inputMethodHints: Qt.ImhSensitiveData  
      }
      
      TextField {
         id: inputFieldUsername
         inputMethodHints: Qt.ImhNoAutoUppercase  
      }
      
      

      After Login.qml,  State is changed then shows up Profile.qml which has one TextField:

      TextField { 
         id: inputFieldUsername 
         inputMethodHints: Qt.ImhDigitsOnly 
      }
      
      

      When user is on Profile.qml and want type only numbers an error occurs with virtual keyboard which has all chars, not only numbers.

      Error: 

      QMetaObject::invokeMethod: No such method QQuickItem_QML_21::inputMethodQuery(Qt::InputMethodQuery,QVariant)
      

       

       

      Notice:

      Error is not displayed on Android 8 or oldest versions.

       

       

      Attachments

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

        Activity

          People

            mitch_curtis Mitch Curtis
            denny0607 Denis Zografski
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes