don't handle keybaord inputs, when the activeFocusItem is editing

This commit is contained in:
Uwe Rathmann 2025-01-15 12:26:26 +01:00
parent 4d1513e5e5
commit c07cf24800
1 changed files with 21 additions and 3 deletions

View File

@ -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