diff --git a/src/widgets/dialogs/UserInfoPopup.cpp b/src/widgets/dialogs/UserInfoPopup.cpp index 3957c4216..dd3585e7b 100644 --- a/src/widgets/dialogs/UserInfoPopup.cpp +++ b/src/widgets/dialogs/UserInfoPopup.cpp @@ -12,6 +12,7 @@ #include "singletons/Settings.hpp" #include "util/LayoutCreator.hpp" #include "util/PostToThread.hpp" +#include "util/Shortcut.hpp" #include "widgets/Label.hpp" #include "widgets/helper/EffectLabel.hpp" #include "widgets/helper/Line.hpp" @@ -60,6 +61,9 @@ UserInfoPopup::UserInfoPopup() this->setWindowFlag(Qt::Popup); #endif + // Close the popup when Escape is pressed + createWindowShortcut(this, "Escape", [this] { this->deleteLater(); }); + auto layout = LayoutCreator(this->getLayoutContainer()) .setLayoutType();