diff --git a/src/flamegraph.cpp b/src/flamegraph.cpp index c3e5f4b3..fa3a473f 100644 --- a/src/flamegraph.cpp +++ b/src/flamegraph.cpp @@ -673,6 +673,8 @@ FlameGraph::FlameGraph(QWidget* parent, Qt::WindowFlags flags) connect(Settings::instance(), &Settings::collapseDepthChanged, this, updateHelper); + m_scene->setBackgroundBrush(QBrush()); + m_scene->setItemIndexMethod(QGraphicsScene::NoIndex); m_view->setScene(m_scene); m_view->viewport()->installEventFilter(this); @@ -1189,12 +1191,6 @@ void FlameGraph::selectItem(FrameGraphicsItem* item) // then layout all items below the selected on layoutItems(item); -#if QT_VERSION <= QT_VERSION_CHECK(5, 15, 12) && QT_VERSION > QT_VERSION_CHECK(5, 15, 10) - // the scene background doesn't get cleared correctly when using qt 5.15.12 - // this doesn't happen in 5.15.10 and 5.15.13 - m_scene->setBackgroundBrush(QBrush()); -#endif - // Triggers a refresh of the scene's bounding rect without going via the // event loop. This makes the centerOn call below work as expected in all cases. m_scene->sceneRect();