From 36734d7d57283c932f1feabe87fd0cf2fa905359 Mon Sep 17 00:00:00 2001 From: Méven Car Date: Sun, 22 Mar 2026 14:39:23 +0100 Subject: kitemsviews/listviewanimation: add a started signal To allow to cancel an edit role when the widget starts being animated. This was hooked to a function not a signal. --- src/kitemviews/private/kitemlistviewanimation.cpp | 2 ++ src/kitemviews/private/kitemlistviewanimation.h | 1 + 2 files changed, 3 insertions(+) (limited to 'src/kitemviews/private') diff --git a/src/kitemviews/private/kitemlistviewanimation.cpp b/src/kitemviews/private/kitemlistviewanimation.cpp index 2ea884461..db98713f7 100644 --- a/src/kitemviews/private/kitemlistviewanimation.cpp +++ b/src/kitemviews/private/kitemlistviewanimation.cpp @@ -143,6 +143,8 @@ void KItemListViewAnimation::start(QGraphicsWidget *widget, AnimationType type, m_animation[type].insert(widget, propertyAnim); propertyAnim->start(); + + Q_EMIT started(widget, type, endValue); } void KItemListViewAnimation::stop(QGraphicsWidget *widget, AnimationType type) diff --git a/src/kitemviews/private/kitemlistviewanimation.h b/src/kitemviews/private/kitemlistviewanimation.h index 821566161..a23715a8a 100644 --- a/src/kitemviews/private/kitemlistviewanimation.h +++ b/src/kitemviews/private/kitemlistviewanimation.h @@ -74,6 +74,7 @@ public: Q_SIGNALS: void finished(QGraphicsWidget *widget, KItemListViewAnimation::AnimationType type); + void started(QGraphicsWidget *widget, AnimationType type, const QVariant &endValue); private Q_SLOTS: void slotFinished(); -- cgit v1.3