mirror of
https://github.com/tnodir/fort
synced 2024-11-15 08:15:10 +00:00
UI: Close windows by Escape key immediately
This commit is contained in:
parent
470ec4248a
commit
2b367f84da
@ -53,11 +53,8 @@ void WidgetWindow::keyPressEvent(QKeyEvent *event)
|
||||
{
|
||||
QWidget::keyPressEvent(event);
|
||||
|
||||
if (event->isAutoRepeat())
|
||||
return;
|
||||
|
||||
switch (event->key()) {
|
||||
case Qt::Key_Escape: // Esc
|
||||
case Qt::Key_Escape:
|
||||
if (event->modifiers() == Qt::NoModifier) {
|
||||
close();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user