sending the initial input method event for clearing the cursor
asynchronously
This commit is contained in:
parent
5cc45e35e2
commit
f10c6437d6
|
@ -317,12 +317,16 @@ void QskInputPanel::attachInputItem( QQuickItem* item )
|
||||||
|
|
||||||
if ( inputProxy() )
|
if ( inputProxy() )
|
||||||
{
|
{
|
||||||
// hiding the cursor in item
|
/*
|
||||||
|
Hiding the cursor in item. We use postEvent
|
||||||
|
so that everything on the item is done,
|
||||||
|
when receiving the event.
|
||||||
|
*/
|
||||||
const QInputMethodEvent::Attribute attribute(
|
const QInputMethodEvent::Attribute attribute(
|
||||||
QInputMethodEvent::Cursor, 0, 0, QVariant() );
|
QInputMethodEvent::Cursor, 0, 0, QVariant() );
|
||||||
|
|
||||||
QInputMethodEvent event( QString(), { attribute } );
|
QCoreApplication::postEvent( item,
|
||||||
QCoreApplication::sendEvent( item, &event );
|
new QInputMethodEvent( QString(), { attribute } ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue