lineEdit_2->setEchoMode(QLineEdit::Password);默认为:QLineEdit::Normal 0 Display characters as they are entere..._qlineedit::password">
当前位置:   article > 正文

qt QLineEdit 账号密码框的设置_qlineedit::password

qlineedit::password

设置占位符

ui->lineEdit->setPalaceholderText("QQ号/手机/邮箱");

设置输入为黑点

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

默认为:

QLineEdit::Normal    0    Display characters as they are entered. This is the default.


不要显示任何东西。这可能适用于密码长度都应该保密的密码。

QLineEdit::NoEcho    1    Do not display anything. This may be appropriate for passwords where even the length of the password should be kept secret.

显示与平台相关的密码掩码字符,而不是实际输入的字符。

QLineEdit::Password    2    Display platform-dependent password mask characters instead of the characters actually entered.

在编辑时按输入显示字符,否则按密码显示字符。

QLineEdit::PasswordEchoOnEdit    3    Display characters as they are entered while editing otherwise display characters as with Password.

 

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号