diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelinewidget.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelinewidget.cpp index 82321a1198c..7d64fad56a3 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/timelinewidget.cpp +++ b/src/plugins/qmldesigner/components/timelineeditor/timelinewidget.cpp @@ -453,7 +453,11 @@ void TimelineWidget::invalidateTimelineDuration(const QmlTimeline &timeline) else if (playHeadFrame > timeline.endKeyframe()) playHeadFrame = timeline.endKeyframe(); - graphicsScene()->setCurrentFrame(playHeadFrame); + /* We have to set the current frame asynchronously, + * because callbacks are not supposed to mutate the model. */ + QTimer::singleShot(0, [this, playHeadFrame] { + graphicsScene()->setCurrentFrame(playHeadFrame); + }); } } }