bad autofocusing of scopes, when reciving the focus removed - it lead to
inconsistent QQuickItem states, when focused items get reparented.
This commit is contained in:
parent
3a0b3f4ad1
commit
d98317942e
@ -69,7 +69,6 @@ int main( int argc, char* argv[] )
|
|||||||
tabView->addTab( "Stack Layout", new StackLayoutPage() );
|
tabView->addTab( "Stack Layout", new StackLayoutPage() );
|
||||||
|
|
||||||
tabView->setCurrentIndex( 4 );
|
tabView->setCurrentIndex( 4 );
|
||||||
tabView->setFocus( true );
|
|
||||||
|
|
||||||
QSize size( 800, 600 );
|
QSize size( 800, 600 );
|
||||||
size = size.expandedTo( tabView->sizeHint().toSize() );
|
size = size.expandedTo( tabView->sizeHint().toSize() );
|
||||||
|
@ -1091,26 +1091,6 @@ bool QskControl::event( QEvent* event )
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case QEvent::FocusIn:
|
|
||||||
{
|
|
||||||
if ( isFocusScope() && isTabFence() && ( scopedFocusItem() == nullptr ) )
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
When receiving the focus we need to have a focused
|
|
||||||
item, so that the tab focus chain has a starting point.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ( auto focusItem = nextItemInFocusChain( true ) )
|
|
||||||
{
|
|
||||||
if ( qskIsItemComplete( focusItem )
|
|
||||||
&& qskIsAncestorOf( this, focusItem ) )
|
|
||||||
{
|
|
||||||
focusItem->setFocus( true );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch( eventType )
|
switch( eventType )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user