From fab78056104eae4149d54514c273936f8f48c36f Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Wed, 18 Oct 2023 21:37:24 +0200 Subject: Relayout when event delegates change implicit size --- src/timeline/EventDelegateChooser.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/timeline/EventDelegateChooser.cpp') diff --git a/src/timeline/EventDelegateChooser.cpp b/src/timeline/EventDelegateChooser.cpp index 19a5357a..2b143b0f 100644 --- a/src/timeline/EventDelegateChooser.cpp +++ b/src/timeline/EventDelegateChooser.cpp @@ -303,6 +303,8 @@ EventDelegateChooser::updatePolish() auto layoutItem = [this](QQuickItem *item, int inset) { if (item) { + QObject::disconnect(item, &QQuickItem::implicitWidthChanged, this, &QQuickItem::polish); + auto attached = qobject_cast( qmlAttachedPropertiesObject(item)); Q_ASSERT(attached != nullptr); @@ -336,6 +338,8 @@ EventDelegateChooser::updatePolish() item->setWidth(width); item->ensurePolished(); + + QObject::connect(item, &QQuickItem::implicitWidthChanged, this, &QQuickItem::polish); } }; -- cgit 1.5.1