diff --git a/src/represent/representer.cpp b/src/represent/representer.cpp index 6ed975d..c3177a6 100644 --- a/src/represent/representer.cpp +++ b/src/represent/representer.cpp @@ -135,6 +135,10 @@ bool Representer::eventFilter(QObject * /*watched*/, QEvent *event) const auto casted = static_cast(event); if (casted->button() == Qt::LeftButton) hide(); + } else if (event->type() == QEvent::KeyPress) { + const auto casted = static_cast(event); + if (casted->key() == Qt::Key_Escape) + hide(); } return false; }