Looks like the fix for
QTBUG-54275 ( " QGraphicsScene::update(): Keep the list of updatedRects() unique" 1d09b0d1b28eaea17069f7359956640f31ea79c6 https://codereview.qt-project.org/c/qt/qtbase/+/241098 ) causes update() call to get very slow due to it scanning the whole list. qFuzzyCompare and especially qAbs is showing up quite high in a profiler.
With attached minimal example, press the button and it will freeze for a while.
On my system, Qt 5.11.3 completes in 9ms, but Qt 5.12.4 takes over 6 seconds.