qt: Handle Android back key in the Node window

This commit is contained in:
Hennadii Stepanov committed 2021-12-03 01:03:30 +02:00
1 parent f045f98717
commit a56a104938
1 file changed
+2 -2
+2 -2
View File
@@ -14,6 +14,7 @@
#include <netbase.h> #include <netbase.h>
#include <qt/bantablemodel.h> #include <qt/bantablemodel.h>
#include <qt/clientmodel.h> #include <qt/clientmodel.h>
#include <qt/guiutil.h>
#include <qt/peertablesortproxy.h> #include <qt/peertablesortproxy.h>
#include <qt/platformstyle.h> #include <qt/platformstyle.h>
#include <qt/walletmodel.h> #include <qt/walletmodel.h>
@@ -910,8 +911,7 @@ void RPCConsole::clear(bool keep_prompt)
void RPCConsole::keyPressEvent(QKeyEvent *event) void RPCConsole::keyPressEvent(QKeyEvent *event)
{ {
if(windowType() != Qt::Widget && event->key() == Qt::Key_Escape) if (windowType() != Qt::Widget && GUIUtil::IsEscapeOrBack(event->key())) {
{
close(); close();
} }
} }