libs: do not grab and ugrab the keyboard from the calendar focus change events

QCalendardWidget (and consequently KCalendarWidget) focus policy is set to
Qt::StrongFocus by default

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-07-23 18:40:32 +03:00
parent 49e1b04def
commit ecf0d7659b
2 changed files with 0 additions and 14 deletions

View file

@ -126,18 +126,6 @@ void CalendarPrivate::init(const QDate &initialDate)
updateSize();
}
void Calendar::focusInEvent(QFocusEvent* event)
{
Q_UNUSED(event);
grabKeyboard();
}
void Calendar::focusOutEvent(QFocusEvent* event)
{
Q_UNUSED(event);
ungrabKeyboard();
}
void Calendar::keyPressEvent(QKeyEvent* event)
{
switch(event->key()) {

View file

@ -68,8 +68,6 @@ Q_SIGNALS:
protected:
void keyPressEvent(QKeyEvent * event);
void focusInEvent(QFocusEvent * event);
void focusOutEvent(QFocusEvent * event);
void showEvent(QShowEvent * event);
private Q_SLOTS: