Using QLineEdit for passwords
Asked Answered
K

1

33

How can I make a QLineEdit suitable for entering passwords (i.e. it doesn't show what's entered), something like the follwing:

enter image description here

Kelcie answered 29/4, 2011 at 16:1 Comment(0)
B
86

setEchoMode (Documentation) for your object.

Example code:

ui->lineEditPassword->setEchoMode(QLineEdit::Password);

You can do it from Qt Designer:

enter image description here

Brawny answered 29/4, 2011 at 16:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.