summaryrefslogtreecommitdiffstats
path: root/qt-ui/simplewidgets.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/simplewidgets.cpp')
-rw-r--r--qt-ui/simplewidgets.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp
index 7da691d1b..b11d7528a 100644
--- a/qt-ui/simplewidgets.cpp
+++ b/qt-ui/simplewidgets.cpp
@@ -314,6 +314,12 @@ bool DateWidget::eventFilter(QObject *object, QEvent *event)
calendarWidget->hide();
return true;
}
+ if(event->type() == QEvent::KeyPress){
+ QKeyEvent *ev = static_cast<QKeyEvent*>(event);
+ if(ev->key() == Qt::Key_Escape){
+ calendarWidget->hide();
+ }
+ }
return QObject::eventFilter(object, event);
}