[Solved] Password Delayed Echoing
-
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
*******dThen, 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 -
Try QLineEdit::PasswordEchoOnEdit (see "here":http://doc.qt.nokia.com/latest/qlineedit.html#EchoMode-enum).
-
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.
-
Apologies for my ignorance, but are you trying to achieve the same effect seen in a lot of mobile applications?
-
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.
-
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.
-
Thanks for the information - much appreciated!
-
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).