qt QLineEdit 账号密码框的设置

设置占位符

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.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值