using qskControlCast

This commit is contained in:
Uwe Rathmann 2020-12-27 16:08:52 +01:00
parent 556cde3f88
commit 9f2dc44619

View File

@ -130,11 +130,11 @@ class IconGrid : public QskLinearBox
for ( int i = 0; i < elementCount(); i++ )
{
if ( auto item = qobject_cast< QskControl* > ( itemAtIndex( i ) ) )
if ( auto control = qskControlCast( itemAtIndex( i ) ) )
{
// to support the optimizations in ScrollArea::updateVisibilities
item->setLayoutHint( RetainSizeWhenHidden, true );
item->setVisible( false );
control->setLayoutHint( RetainSizeWhenHidden, true );
control->setVisible( false );
}
}
#endif