don't handle keybaord inputs, when the activeFocusItem is editing
This commit is contained in:
parent
4d1513e5e5
commit
c07cf24800
|
@ -61,6 +61,21 @@ static inline bool qskIsEnablingKey( const QKeyEvent* event )
|
|||
return qskIsButtonPressKey( event ) || qskFocusChainIncrement( event );
|
||||
}
|
||||
|
||||
static inline bool qskIsEditing( const QQuickWindow* window )
|
||||
{
|
||||
if ( !QGuiApplication::inputMethod()->isVisible() )
|
||||
{
|
||||
if ( auto item = window->activeFocusItem() )
|
||||
{
|
||||
const QVariant v = item->property( "editing" );
|
||||
if ( v.value< bool >() )
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
class QskFocusIndicator::PrivateData
|
||||
{
|
||||
public:
|
||||
|
@ -187,6 +202,9 @@ bool QskFocusIndicator::eventFilter( QObject* object, QEvent* event )
|
|||
case QEvent::KeyRelease:
|
||||
case QEvent::ShortcutOverride:
|
||||
{
|
||||
if ( qskIsEditing( window() ) )
|
||||
return false;
|
||||
|
||||
if ( m_data->timer.isActive() )
|
||||
{
|
||||
// renew the exposed period
|
||||
|
|
Loading…
Reference in New Issue