Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] Password Delayed Echoing
Forum Updated to NodeBB v4.3 + New Features

[Solved] Password Delayed Echoing

Scheduled Pinned Locked Moved General and Desktop
8 Posts 3 Posters 3.5k 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.
  • K Offline
    K Offline
    kbt90
    wrote on last edited by
    #1

    I am trying to create a password dialog in which the user types in a value and can see that value until they type in the next value. Then the previous value becomes an asterisk.

    For example, if the password is password, an entry would look as follows:
    p
    *a
    **s
    ***s
    ****w
    *****o
    ******r
    *******d

    Then, if the user pulls up the screen, all values will be displayed as an asterisk (e.g. ********).

    Is there a way to do this using a delayed text echo with existing widgets or will I have to create a custom dialog?

    Thanks,
    Katelyn

    1 Reply Last reply
    0
    • L Offline
      L Offline
      loladiro
      wrote on last edited by
      #2

      Try QLineEdit::PasswordEchoOnEdit (see "here":http://doc.qt.nokia.com/latest/qlineedit.html#EchoMode-enum).

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kbt90
        wrote on last edited by
        #3

        Thanks for the quick response! This accomplishes the password appearing as asterisks after I click out of the QLineEdit widget, but it does not hide the password letter by letter as it is entered.

        1 Reply Last reply
        0
        • B Offline
          B Offline
          bobby
          wrote on last edited by
          #4

          Apologies for my ignorance, but are you trying to achieve the same effect seen in a lot of mobile applications?

          "Linux is not user-friendly." It is user-friendly. It is not ignorant-friendly and idiot-friendly.
          ---Source unknown

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kbt90
            wrote on last edited by
            #5

            Yes, this effect can be seen on the android OS (mobile phones, NOOK Color, etc). I'm not sure if this is how other mobile phones do it.

            1 Reply Last reply
            0
            • L Offline
              L Offline
              loladiro
              wrote on last edited by
              #6

              This has been discussed "here":http://bugreports.qt.nokia.com/browse/QTBUG-17003 in the context of qml (since it is common for mobile platforms). However as you can read, there is currently no native Qt implementation for this behavior (I hope they'll include it in Qt 5). If you really need it you'll have to implement it yourself.

              1 Reply Last reply
              0
              • K Offline
                K Offline
                kbt90
                wrote on last edited by
                #7

                Thanks for the information - much appreciated!

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  loladiro
                  wrote on last edited by
                  #8

                  No problem. And if you consider you question solved, don't forget to add a [Solved] in front of your title (click edit on your first post).

                  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