Pressing escape hides PreviewUploadOverlay
This commit is contained in:
parent
b31e74d9f6
commit
21a649492f
@ -203,3 +203,13 @@ PreviewUploadOverlay::setPreview(const QString &path)
|
|||||||
setLabels(split[1], mime.name(), data_.size());
|
setLabels(split[1], mime.name(), data_.size());
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
PreviewUploadOverlay::keyPressEvent(QKeyEvent *event)
|
||||||
|
{
|
||||||
|
if( event->key() == Qt::Key_Escape )
|
||||||
|
{
|
||||||
|
emit aborted();
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
}
|
@ -25,6 +25,7 @@ public:
|
|||||||
void setPreview(const QImage &src, const QString &mime);
|
void setPreview(const QImage &src, const QString &mime);
|
||||||
void setPreview(const QByteArray data, const QString &mime);
|
void setPreview(const QByteArray data, const QString &mime);
|
||||||
void setPreview(const QString &path);
|
void setPreview(const QString &path);
|
||||||
|
void keyPressEvent(QKeyEvent *event);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void confirmUpload(const QByteArray data, const QString &media, const QString &filename);
|
void confirmUpload(const QByteArray data, const QString &media, const QString &filename);
|
||||||
|
Loading…
Reference in New Issue
Block a user