Using QLineEdit for passwords
35,443
Solution 1
setEchoMode
(Documentation) for your object.
Example code:
ui->lineEditPassword->setEchoMode(QLineEdit::Password);
You can do it from Qt Designer:
Solution 2
Use setEchoMode
and QLineEdit::Password
passwordField->setEchoMode(QLineEdit::Password);
Solution 3
You can using below command to hide text in lineEdit
ui->lineEditPassword->setEchoMode(QLineEdit::Password);
Related videos on Youtube
Author by