Close UserInfoPopup when Escape is pressed
This commit is contained in:
@@ -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<QWidget>(this->getLayoutContainer())
|
||||
.setLayoutType<QVBoxLayout>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user