Изменение базового класса окна About
[novacoin.git] / src / qt / aboutdialog.cpp
index a3aa6de..a66287d 100644 (file)
@@ -1,13 +1,19 @@
 #include "aboutdialog.h"
 #include "ui_aboutdialog.h"
+
+#include "dialogwindowflags.h"
+
 #include "clientmodel.h"
 
+#include "version.h"
+
+#include <QKeyEvent>
+
 AboutDialog::AboutDialog(QWidget *parent) :
-    QDialog(parent),
+    QWidget(parent, DIALOGWINDOWHINTS),
     ui(new Ui::AboutDialog)
 {
     ui->setupUi(this);
-
 }
 
 void AboutDialog::setModel(ClientModel *model)
@@ -27,3 +33,18 @@ void AboutDialog::on_buttonBox_accepted()
 {
     close();
 }
+
+void AboutDialog::keyPressEvent(QKeyEvent *event)
+{
+#ifdef ANDROID
+    if(event->key() == Qt::Key_Back)
+    {
+        close();
+    }
+#else
+    if(event->key() == Qt::Key_Escape)
+    {
+        close();
+    }
+#endif
+}
\ No newline at end of file