Skip to content
Snippets Groups Projects
Commit 21a64949 authored by salahmak's avatar salahmak
Browse files

Pressing escape hides PreviewUploadOverlay

parent b31e74d9
No related branches found
No related tags found
No related merge requests found
Pipeline #910 failed
......@@ -203,3 +203,13 @@ PreviewUploadOverlay::setPreview(const QString &path)
setLabels(split[1], mime.name(), data_.size());
init();
}
void
PreviewUploadOverlay::keyPressEvent(QKeyEvent *event)
{
if( event->key() == Qt::Key_Escape )
{
emit aborted();
close();
}
}
\ No newline at end of file
......@@ -25,6 +25,7 @@ public:
void setPreview(const QImage &src, const QString &mime);
void setPreview(const QByteArray data, const QString &mime);
void setPreview(const QString &path);
void keyPressEvent(QKeyEvent *event);
signals:
void confirmUpload(const QByteArray data, const QString &media, const QString &filename);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment