bug#96758 Esc关闭窗口 #97277翻译

This commit is contained in:
kangshuning 2021-12-14 14:40:13 +08:00
parent 40f08e7fe0
commit 86841dc919
3 changed files with 5 additions and 2 deletions

View File

@ -169,6 +169,7 @@ void NetDetail::initUI()
securityPage = new SecurityPage(this); securityPage = new SecurityPage(this);
createNetPage = new CreatNetPage(this); createNetPage = new CreatNetPage(this);
this->installEventFilter(this);
detailPage->installEventFilter(this); detailPage->installEventFilter(this);
ipv4Page->installEventFilter(this); ipv4Page->installEventFilter(this);
ipv6Page->installEventFilter(this); ipv6Page->installEventFilter(this);
@ -929,8 +930,10 @@ bool NetDetail::eventFilter(QObject *w, QEvent *event)
emit confimBtn->clicked(); emit confimBtn->clicked();
} }
return true; return true;
} else if (mEvent->key() == Qt::Key_Escape) {
close();
return true;
} }
} }
return QWidget::eventFilter(w, event); return QWidget::eventFilter(w, event);
} }

Binary file not shown.

View File

@ -644,7 +644,7 @@
<message> <message>
<location filename="../src/frontend/netdetails/netdetail.cpp" line="266"/> <location filename="../src/frontend/netdetails/netdetail.cpp" line="266"/>
<source>Add Lan Connect</source> <source>Add Lan Connect</source>
<translation>线</translation> <translation>线</translation>
</message> </message>
<message> <message>
<location filename="../src/frontend/netdetails/netdetail.cpp" line="275"/> <location filename="../src/frontend/netdetails/netdetail.cpp" line="275"/>