diff --git a/src/confform.cpp b/src/confform.cpp index f472f228..9278089e 100644 --- a/src/confform.cpp +++ b/src/confform.cpp @@ -131,6 +131,7 @@ ConfForm::ConfForm(QWidget *parent) : setModal(false); KWindowEffects::enableBlurBehind(this->winId(), true, QRegion(path.toFillPolygon().toPolygon())); + setEnableOfBtn(); } ConfForm::~ConfForm() @@ -553,7 +554,7 @@ void ConfForm::on_leDns_textEdited(const QString &arg1) //编辑网络备用DNS void ConfForm::on_leDns2_textEdited(const QString &arg1) { - // this->setEnableOfBtn(); + this->setEnableOfBtn(); } //设置界面按钮是否可点击 @@ -584,6 +585,14 @@ void ConfForm::setEnableOfBtn() this->setBtnEnableFalse(); return; } + if(ui->leDns2->text().isEmpty()){ + + }else{ + if(!this->getTextEditState(ui->leDns2->text())){ + this->setBtnEnableFalse(); + return ; + } + } }