restoring the focus only makes sense, when editing is terminated from

the input method
This commit is contained in:
Uwe Rathmann 2021-04-26 16:29:17 +02:00
parent 91232e845c
commit 777149aecb

View File

@ -376,7 +376,12 @@ void QskTextInput::keyPressEvent( QKeyEvent* event )
QGuiApplication::inputMethod()->commit();
if ( !( inputMethodHints() & Qt::ImhMultiLine ) )
{
setEditing( false );
// When returning from a virtual keyboard
qskForceActiveFocus( this, Qt::PopupFocusReason );
}
}
break;
}
@ -384,6 +389,7 @@ void QskTextInput::keyPressEvent( QKeyEvent* event )
case Qt::Key_Escape:
{
setEditing( false );
qskForceActiveFocus( this, Qt::PopupFocusReason );
break;
}
#endif
@ -665,9 +671,6 @@ void QskTextInput::setEditing( bool on )
inputMethod->reset();
#endif
qskInputMethodSetVisible( this, false );
#if 1
qskForceActiveFocus( this, Qt::PopupFocusReason );
#endif
}
Q_EMIT editingChanged( on );