change slot close, to signal closing

This commit is contained in:
kirp 2021-08-11 02:26:26 +03:00
parent a88c68c0a8
commit c7295d7fd1
No known key found for this signature in database
GPG Key ID: E0277EFCA43284BE
1 changed files with 3 additions and 2 deletions

View File

@ -28,10 +28,11 @@ ImageOverlay::ImageOverlay(QPixmap image, QWidget *parent)
setAttribute(Qt::WA_TranslucentBackground, true); setAttribute(Qt::WA_TranslucentBackground, true);
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
setWindowState(Qt::WindowFullScreen); 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(); raise();
} }