diff --git a/src/dialogs/PreviewUploadOverlay.cpp b/src/dialogs/PreviewUploadOverlay.cpp index c0a02bdd..66fa1b37 100644 --- a/src/dialogs/PreviewUploadOverlay.cpp +++ b/src/dialogs/PreviewUploadOverlay.cpp @@ -207,9 +207,10 @@ PreviewUploadOverlay::setPreview(const QString &path) void PreviewUploadOverlay::keyPressEvent(QKeyEvent *event) { - if( event->key() == Qt::Key_Escape ) - { - emit aborted(); - close(); + if (event->matches(QKeySequence::Cancel)) { + emit aborted(); + close(); + } else { + QWidget::keyPressEvent(event); } } \ No newline at end of file