How can I 开发者_开发百科make a QLineEdit
suitable for entering passwords (i.e. it doesn't show what's entered), something like the follwing:
setEchoMode
(Documentation) for your object.
Example code:
ui->lineEditPassword->setEchoMode(QLineEdit::Password);
You can do it from Qt Designer:
Use setEchoMode
and QLineEdit::Password
passwordField->setEchoMode(QLineEdit::Password);
You can using below command to hide text in lineEdit
ui->lineEditPassword->setEchoMode(QLineEdit::Password);
精彩评论