Ai
81 Star 380 Fork 168

LibQQt应用程序开发组织/LibQQt

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
qqtpassworddialog.cpp 1.29 KB
一键复制 编辑 原始数据 按行查看 历史
T.D.R. 提交于 2018-05-12 21:50 +08:00 . support msvc2015
#include "qqtpassworddialog.h"
#include "ui_qqtpassworddialog.h"
QQtPasswordDialog::QQtPasswordDialog(QWidget* parent) :
QQtDialog(parent),
ui(new Ui::QQtPasswordDialog)
{
ui->setupUi(this);
setAttribute(Qt::WA_DeleteOnClose, false);
/*
* 阻挡父亲窗口内其他控件,除非本dialog关闭 show的功能强大起来 可以使用输入法
*/
setWindowModality(Qt::WindowModal);
ui->lineEdit_ssid_password->setEchoMode(QLineEdit::Password);
ui->pushButton_ssid_connect->setEnabled(false);
connect(ui->pushButton_ssid_connect, SIGNAL(clicked()), this, SLOT(connectClicked()));
connect(ui->lineEdit_ssid_password, SIGNAL(textChanged(QString)), SLOT(btnEnabled(QString)));
connect(ui->btnCancel, SIGNAL(clicked()), this, SLOT(reject()));
}
QQtPasswordDialog::~QQtPasswordDialog()
{
delete ui;
}
void QQtPasswordDialog::setWifiName(QString name)
{
ui->label_ssid_name->setText(name);
}
QString QQtPasswordDialog::wifiPwd()
{
return ui->lineEdit_ssid_password->text();
}
void QQtPasswordDialog::connectClicked()
{
emit connectClicked(ui->lineEdit_ssid_password->text());
accept();
}
void QQtPasswordDialog::btnEnabled(QString pas)
{
bool enable = pas.length() < 8 ? false : true;
ui->pushButton_ssid_connect->setEnabled(enable);
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/drabel/LibQQt.git
git@gitee.com:drabel/LibQQt.git
drabel
LibQQt
LibQQt
master

搜索帮助