diff options
author | kirp <kirp@dismail.de> | 2021-08-11 02:26:26 +0300 |
---|---|---|
committer | kirp <kirp@dismail.de> | 2021-08-11 02:26:26 +0300 |
commit | c7295d7fd1a4732592c8fc9d2ffd7fd6ebba40eb (patch) | |
tree | 248968404fbc1454c746fe98851af9c0e446e24b /src/dialogs/ImageOverlay.cpp | |
parent | add shortcut Escape button for closing images issues 672 (diff) | |
download | nheko-c7295d7fd1a4732592c8fc9d2ffd7fd6ebba40eb.tar.xz |
change slot close, to signal closing
Diffstat (limited to 'src/dialogs/ImageOverlay.cpp')
-rw-r--r-- | src/dialogs/ImageOverlay.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dialogs/ImageOverlay.cpp b/src/dialogs/ImageOverlay.cpp index 0a3777f0..50cc5564 100644 --- a/src/dialogs/ImageOverlay.cpp +++ b/src/dialogs/ImageOverlay.cpp @@ -28,10 +28,11 @@ ImageOverlay::ImageOverlay(QPixmap image, QWidget *parent) setAttribute(Qt::WA_TranslucentBackground, true); setAttribute(Qt::WA_DeleteOnClose, true); setWindowState(Qt::WindowFullScreen); + close_shortcut_ = new QShortcut(QKeySequence(Qt::Key_Escape), this); - connect(this, SIGNAL(closing()), this, SLOT(close())); + connect(close_shortcut_, &QShortcut::activated, this, &ImageOverlay::closing); + connect(this, &ImageOverlay::closing, this, &ImageOverlay::close); - close_shortcut_ = new QShortcut(QKeySequence(Qt::Key_Escape), this, SLOT(close())); raise(); } |