53007 修改wifi密码输入框为按下显示明文松开取消明文
This commit is contained in:
parent
d2ef240613
commit
200f394899
|
@ -841,13 +841,16 @@ bool OneConnForm::isWifiConfExist(QString netName)
|
|||
}
|
||||
|
||||
//设置密码隐藏或可见
|
||||
void OneConnForm::on_checkBoxPwd_stateChanged(int arg1)
|
||||
void OneConnForm::on_checkBoxPwd_pressed()
|
||||
{
|
||||
if (arg1 == 0) {
|
||||
ui->lePassword->setEchoMode(QLineEdit::Password);
|
||||
} else {
|
||||
ui->checkBoxPwd->setChecked(true);
|
||||
ui->lePassword->setEchoMode(QLineEdit::Normal);
|
||||
}
|
||||
|
||||
void OneConnForm::on_checkBoxPwd_released()
|
||||
{
|
||||
ui->checkBoxPwd->setChecked(false);
|
||||
ui->lePassword->setEchoMode(QLineEdit::Password);
|
||||
}
|
||||
|
||||
void OneConnForm::on_lePassword_textEdited(const QString &arg1)
|
||||
|
|
|
@ -124,14 +124,16 @@ private slots:
|
|||
|
||||
void on_btnHideConn_clicked();
|
||||
|
||||
void on_checkBoxPwd_stateChanged(int arg1);
|
||||
|
||||
void on_lePassword_textEdited(const QString &arg1);
|
||||
|
||||
void on_btnInfo_clicked();
|
||||
|
||||
void on_btnCancel_clicked();
|
||||
|
||||
void on_checkBoxPwd_pressed();
|
||||
|
||||
void on_checkBoxPwd_released();
|
||||
|
||||
private:
|
||||
QTimer *waitTimer = nullptr;
|
||||
int waitPage;
|
||||
|
|
|
@ -148,13 +148,17 @@ void WiFiConfigDialog::toConfigWifi()
|
|||
}
|
||||
}
|
||||
|
||||
void WiFiConfigDialog::on_checkBoxPwd_stateChanged(int arg1)
|
||||
//切换密码明文
|
||||
void WiFiConfigDialog::on_checkBoxPwd_pressed()
|
||||
{
|
||||
if (arg1 == 0) {
|
||||
ui->leWifiPassword ->setEchoMode(QLineEdit::Password);
|
||||
} else {
|
||||
ui->checkBoxPwd->setChecked(true);
|
||||
ui->leWifiPassword->setEchoMode(QLineEdit::Normal);
|
||||
}
|
||||
|
||||
void WiFiConfigDialog::on_checkBoxPwd_released()
|
||||
{
|
||||
ui->checkBoxPwd->setChecked(false);
|
||||
ui->leWifiPassword ->setEchoMode(QLineEdit::Password);
|
||||
}
|
||||
|
||||
void WiFiConfigDialog::on_leWifiId_textEdited(const QString &arg1)
|
||||
|
|
|
@ -31,14 +31,16 @@ private slots:
|
|||
|
||||
void on_btnOk_clicked();
|
||||
|
||||
void on_checkBoxPwd_stateChanged(int arg1);
|
||||
|
||||
void on_leWifiId_textEdited(const QString &arg1);
|
||||
|
||||
void on_leWiFiName_textEdited(const QString &arg1);
|
||||
|
||||
void on_leWifiPassword_textEdited(const QString &arg1);
|
||||
|
||||
void on_checkBoxPwd_pressed();
|
||||
|
||||
void on_checkBoxPwd_released();
|
||||
|
||||
private:
|
||||
Ui::WiFiConfigDialog *ui;
|
||||
QGSettings *m_transparency_gsettings = nullptr;
|
||||
|
|
|
@ -504,14 +504,15 @@ void WpaWifiDialog::initConnect() {
|
|||
//连接按钮
|
||||
connect(connectBtn, &QPushButton::clicked, this, &WpaWifiDialog::slot_on_connectBtn_clicked);
|
||||
//显示密码
|
||||
connect(pwdShowBtn, &QCheckBox::clicked, this, [ = ]() {
|
||||
if (pwdShowBtn->isChecked()) {
|
||||
connect(pwdShowBtn, &QCheckBox::pressed, this, [ = ]() {
|
||||
pwdShowBtn->setChecked(true);
|
||||
pwdEditor->setEchoMode(QLineEdit::Normal);
|
||||
m_pwd4PrivateKeyPWDEditor->setEchoMode(QLineEdit::Normal);
|
||||
} else {
|
||||
});
|
||||
connect(pwdShowBtn, &QCheckBox::released, this, [ = ]() {
|
||||
pwdShowBtn->setChecked(false);
|
||||
pwdEditor->setEchoMode(QLineEdit::Password);
|
||||
m_pwd4PrivateKeyPWDEditor->setEchoMode(QLineEdit::Password);
|
||||
}
|
||||
});
|
||||
connect(pwdEditor, &QLineEdit::textChanged, this, &WpaWifiDialog::slot_line_edit_changed);
|
||||
connect(userEditor, &QLineEdit::textChanged, this, &WpaWifiDialog::slot_line_edit_changed);
|
||||
|
|
|
@ -340,13 +340,17 @@ void DlgHideWifiWpa::on_btnConnect_clicked()
|
|||
// shellProcess->deleteLater();
|
||||
//}
|
||||
|
||||
void DlgHideWifiWpa::on_checkBoxPwd_stateChanged(int arg1)
|
||||
//切换密码明文
|
||||
void DlgHideWifiWpa::on_checkBoxPwd_pressed()
|
||||
{
|
||||
if (arg1 == 0) {
|
||||
ui->lePassword ->setEchoMode(QLineEdit::Password);
|
||||
} else {
|
||||
ui->checkBoxPwd->setChecked(true);
|
||||
ui->lePassword->setEchoMode(QLineEdit::Normal);
|
||||
}
|
||||
|
||||
void DlgHideWifiWpa::on_checkBoxPwd_released()
|
||||
{
|
||||
ui->checkBoxPwd->setChecked(false);
|
||||
ui->lePassword->setEchoMode(QLineEdit::Password);
|
||||
}
|
||||
|
||||
void DlgHideWifiWpa::on_leNetName_textEdited(const QString &arg1)
|
||||
|
|
|
@ -54,14 +54,16 @@ private slots:
|
|||
|
||||
void on_btnConnect_clicked();
|
||||
|
||||
void on_checkBoxPwd_stateChanged(int arg1);
|
||||
|
||||
void on_leNetName_textEdited(const QString &arg1);
|
||||
|
||||
void on_lePassword_textEdited(const QString &arg1);
|
||||
|
||||
// void finishedProcess(int res);
|
||||
|
||||
void on_checkBoxPwd_pressed();
|
||||
|
||||
void on_checkBoxPwd_released();
|
||||
|
||||
signals:
|
||||
void reSetWifiList();
|
||||
void stopSignal();
|
||||
|
|
Loading…
Reference in New Issue