From b31f94225d14e2c2a6781202ee3cc132a6c8c70a Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Tue, 17 Oct 2023 14:34:20 +0200 Subject: [PATCH] ItemChildRemovedChange handling added --- src/controls/QskControl.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/controls/QskControl.cpp b/src/controls/QskControl.cpp index a293882b..9b3d5113 100644 --- a/src/controls/QskControl.cpp +++ b/src/controls/QskControl.cpp @@ -915,10 +915,16 @@ void QskControl::itemChange( QQuickItem::ItemChange change, break; } case QQuickItem::ItemChildAddedChange: + case QQuickItem::ItemChildRemovedChange: { - if ( autoLayoutChildren() && qskIsAdjustableByLayout( value.item ) ) - polish(); + if ( autoLayoutChildren() ) + { + if ( qskIsVisibleToLayout( value.item ) ) + resetImplicitSize(); + if ( qskIsAdjustableByLayout( value.item ) ) + polish(); + } break; } case QQuickItem::ItemActiveFocusHasChanged: