Fixing VKB QDateEdit <Enter> does not work!
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#include <QComboBox>
|
||||
#include <QDateEdit>
|
||||
#include <QtVirtualKeyboard>
|
||||
|
||||
#include <QKeyEvent>
|
||||
#include <QLineEdit>
|
||||
#include <QAbstractSpinBox>
|
||||
|
||||
@@ -91,6 +91,14 @@ bool InputObject::eventFilter(QObject* obj, QEvent* event)
|
||||
|
||||
//qDebug() << "touchScreen()";
|
||||
}
|
||||
if (event->type() == QEvent::KeyPress) {
|
||||
QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event);
|
||||
if (keyEvent->key() == Qt::Key_Return && curDateEdit)
|
||||
{
|
||||
this->HidePanel();
|
||||
this->hide();
|
||||
}
|
||||
}
|
||||
//mouse button release means setfocus is useless
|
||||
if (event->type() == QEvent::MouseButtonRelease)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user