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. In TextField not work Qt.ImhHiddenText
Forum Updated to NodeBB v4.3 + New Features

In TextField not work Qt.ImhHiddenText

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
9 Posts 4 Posters 970 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.
  • M Offline
    M Offline
    Mihaill
    wrote on last edited by
    #1

    Hi!
    I use in TextField:

    inputMethodHints: Qt.ImhHiddenText
    

    but the text is not hidden. Please tell me why it does not work?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Mihaill
      wrote on last edited by
      #2

      But it's work:

      echoMode: TextInput.Password
      

      Why not work:

      inputMethodHints: Qt.ImhHiddenText
      

      ?

      jsulmJ 1 Reply Last reply
      0
      • M Mihaill

        But it's work:

        echoMode: TextInput.Password
        

        Why not work:

        inputMethodHints: Qt.ImhHiddenText
        

        ?

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @Mihaill inputMethodHints: "The value is a bit-wise combination of flags" from https://doc.qt.io/qt-5/qml-qtquick-controls-textfield.html
        I'm not a QML expert, but I guess you should keep other flags when adding Qt.ImhHiddenText, like

        inputMethodHints: inputMethodHints | Qt.ImhHiddenText
        

        Not sure about syntax though.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

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

          @jsulm said in In TextField not work Qt.ImhHiddenText:

          Qt.ImhHiddenText

          It's not work:

          inputMethodHints: Qt.ImhDigitsOnly | Qt.ImhHiddenText
          
          Gojir4G 1 Reply Last reply
          0
          • GrecKoG Offline
            GrecKoG Offline
            GrecKo
            Qt Champions 2018
            wrote on last edited by
            #5

            What do you want to do?

            1 Reply Last reply
            0
            • M Mihaill

              @jsulm said in In TextField not work Qt.ImhHiddenText:

              Qt.ImhHiddenText

              It's not work:

              inputMethodHints: Qt.ImhDigitsOnly | Qt.ImhHiddenText
              
              Gojir4G Offline
              Gojir4G Offline
              Gojir4
              wrote on last edited by Gojir4
              #6

              @Mihaill I have the same behavior. But according to these posts,
              https://stackoverflow.com/questions/50551251/qml-textinput-ignoring-inputmethodhints
              https://forum.qt.io/topic/59089/how-use-inputmethodhints-property/2,
              it seems that inputMethodHints is dedicated to the virtual keyboard and not the text field . I didn't find any indication about this in the doc, or I have missed it.
              I guess the solution is to use

              echoMode: TextInput.Password
              
              1 Reply Last reply
              0
              • M Offline
                M Offline
                Mihaill
                wrote on last edited by
                #7

                Here is a link to the documentation.
                https://doc.qt.io/qt-5/qml-qtquick-controls-textfield.html
                This option works for me too. Just wondering why the documentation team isn't working. Perhaps this is a bug in Qt.

                jsulmJ 1 Reply Last reply
                0
                • M Mihaill

                  Here is a link to the documentation.
                  https://doc.qt.io/qt-5/qml-qtquick-controls-textfield.html
                  This option works for me too. Just wondering why the documentation team isn't working. Perhaps this is a bug in Qt.

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @Mihaill said in In TextField not work Qt.ImhHiddenText:

                  Perhaps this is a bug in Qt

                  You can report it in the Qt bug tracker: https://bugreports.qt.io/secure/Dashboard.jspa

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    Mihaill
                    wrote on last edited by
                    #9

                    I created the topic , I hope after the developers will fix it.

                    1 Reply Last reply
                    1

                    • Login

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