View Full Version : QLineEdit and EchoMode Passowrd

1st April 2009, 17:36

I am trying to make a password field by using QLineEdit with the EchoMode Password and the field is filled with '*' even when it is empty.
Calleing clear() or setting an empty string at startup makes no difference.
It works ok, I can type in my password, but it is always filled with '*'.
I thought it was a Qt-Vista related bug, but it is the same under XP.

Any one knows any thing about this?


1st April 2009, 18:10
what is returned when u call text() on lineedit with "*" in it..call length of the returned string..there must be something there..

1st April 2009, 18:25

length is 0.
text() returns an empty string. (while is is full with '*' at the same time!)

As I said, I also can type in in "insert" mode (the whole length of the field), which would be possible if there was something already.

This project it really a very simple project, almost a hello world app!
Its just an ui done by designer, and all i do is read the text from the QLineEdits, thats it!

Thanks for the help!

This happens as soon as I choose Password EchoMode in Designer!!
This has nothing to do with my code!

1st April 2009, 18:34
Ok - as always, the problem is between the keyboard and the chair.
I had an input mask, which required numeric input.