mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Added keyboard navigation to the calendar date picker.
Wee. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
a7240cd83f
commit
ef6c410574
2 changed files with 15 additions and 1 deletions
|
@ -374,4 +374,17 @@ void DateWidget::focusInEvent(QFocusEvent *event)
|
|||
void DateWidget::focusOutEvent(QFocusEvent *event)
|
||||
{
|
||||
QWidget::focusOutEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue