restoring the focus only makes sense, when editing is terminated from
the input method
This commit is contained in:
parent
91232e845c
commit
777149aecb
@ -376,7 +376,12 @@ void QskTextInput::keyPressEvent( QKeyEvent* event )
|
|||||||
QGuiApplication::inputMethod()->commit();
|
QGuiApplication::inputMethod()->commit();
|
||||||
|
|
||||||
if ( !( inputMethodHints() & Qt::ImhMultiLine ) )
|
if ( !( inputMethodHints() & Qt::ImhMultiLine ) )
|
||||||
|
{
|
||||||
setEditing( false );
|
setEditing( false );
|
||||||
|
|
||||||
|
// When returning from a virtual keyboard
|
||||||
|
qskForceActiveFocus( this, Qt::PopupFocusReason );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -384,6 +389,7 @@ void QskTextInput::keyPressEvent( QKeyEvent* event )
|
|||||||
case Qt::Key_Escape:
|
case Qt::Key_Escape:
|
||||||
{
|
{
|
||||||
setEditing( false );
|
setEditing( false );
|
||||||
|
qskForceActiveFocus( this, Qt::PopupFocusReason );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -665,9 +671,6 @@ void QskTextInput::setEditing( bool on )
|
|||||||
inputMethod->reset();
|
inputMethod->reset();
|
||||||
#endif
|
#endif
|
||||||
qskInputMethodSetVisible( this, false );
|
qskInputMethodSetVisible( this, false );
|
||||||
#if 1
|
|
||||||
qskForceActiveFocus( this, Qt::PopupFocusReason );
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_EMIT editingChanged( on );
|
Q_EMIT editingChanged( on );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user