diff options
Diffstat (limited to 'qt-ui/simplewidgets.cpp')
-rw-r--r-- | qt-ui/simplewidgets.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp index fe9b8f592..eff3f668b 100644 --- a/qt-ui/simplewidgets.cpp +++ b/qt-ui/simplewidgets.cpp @@ -374,4 +374,17 @@ void DateWidget::focusInEvent(QFocusEvent *event) void DateWidget::focusOutEvent(QFocusEvent *event) { QWidget::focusOutEvent(event); -}
\ No newline at end of file +} + +void DateWidget::keyPressEvent(QKeyEvent *event) +{ + if ( event->key() == Qt::Key_Return || + event->key() == Qt::Key_Enter || + event->key() == Qt::Key_Space){ + calendarWidget->move(mapToGlobal(QPoint(0,64))); + calendarWidget->show(); + event->setAccepted(true); + }else{ + QWidget::keyPressEvent(event); + } +} |