新建有线网络 必填提示

This commit is contained in:
zhangyuanyuan1 2022-10-17 11:42:17 +08:00
parent 9ea4fb823a
commit 91c99a6e82
5 changed files with 19 additions and 2 deletions

View File

@ -60,6 +60,7 @@ void CreatNetPage::initUI()
// m_secDnsLabel->setText(tr("Alternative DNS"));
m_detailLayout = new QFormLayout(this);
m_detailLayout->setContentsMargins(0, 0, 0, 0);
m_detailLayout->setSpacing(24);
m_detailLayout->addRow(m_connNameLabel,connNameEdit);
m_detailLayout->addRow(m_configLabel,ipv4ConfigCombox);
@ -115,12 +116,12 @@ bool CreatNetPage::checkConnectBtnIsEnabled()
qDebug() << "create ipv4 netMask empty or invalid";
return false;
}
#if 0
if (gateWayEdit->text().isEmpty() || !getTextEditState(gateWayEdit->text())) {
qDebug() << "create ipv4 gateway empty or invalid";
return false;
}
#if 0
if (firstDnsEdit->text().isEmpty() && !secondDnsEdit->text().isEmpty()) {
qDebug() << "create ipv4 dns sort invalid";
return false;
@ -165,6 +166,12 @@ void CreatNetPage::setLineEnabled(bool check) {
gateWayEdit->clear();
// firstDnsEdit->clear();
// secondDnsEdit->clear();
ipv4addressEdit->setPlaceholderText(" ");
netMaskEdit->setPlaceholderText(" ");
} else {
ipv4addressEdit->setPlaceholderText(tr("Required")); //必填
netMaskEdit->setPlaceholderText(tr("Required")); //必填
}
}

Binary file not shown.

View File

@ -133,6 +133,11 @@
<source>Manual</source>
<translation></translation>
</message>
<message>
<location filename="../src/frontend/netdetails/creatnetpage.cpp" line="173"/>
<source>Required</source>
<translation></translation>
</message>
</context>
<context>
<name>DetailPage</name>

Binary file not shown.

View File

@ -133,6 +133,11 @@
<source>Manual</source>
<translation></translation>
</message>
<message>
<location filename="../src/frontend/netdetails/creatnetpage.cpp" line="173"/>
<source>Required</source>
<translation></translation>
</message>
</context>
<context>
<name>DetailPage</name>