add shortcut Escape button for closing images issues 672

pull/679/head
kirp 3 years ago
parent 6e8adc7320
commit a88c68c0a8
No known key found for this signature in database
GPG Key ID: E0277EFCA43284BE
  1. 2
      src/dialogs/ImageOverlay.cpp
  2. 2
      src/dialogs/ImageOverlay.h

@ -31,6 +31,8 @@ ImageOverlay::ImageOverlay(QPixmap image, QWidget *parent)
connect(this, SIGNAL(closing()), this, SLOT(close()));
close_shortcut_ = new QShortcut(QKeySequence(Qt::Key_Escape), this, SLOT(close()));
raise();
}

@ -8,6 +8,7 @@
#include <QDialog>
#include <QMouseEvent>
#include <QPixmap>
#include <QShortcut>
namespace dialogs {
@ -32,5 +33,6 @@ private:
QRect content_;
QRect close_button_;
QRect save_button_;
QShortcut *close_shortcut_;
};
} // dialogs

Loading…
Cancel
Save