From 1a4380c8c12998e7cd3cebd39f0153aebbceb067 Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Thu, 18 Dec 2014 10:47:00 -0800 Subject: Connect QGraphicsScene to its parrent This is to prevent a leak of QGraphicsScene. Signed-off-by: Anton Lundin Signed-off-by: Dirk Hohndel --- qt-ui/profile/profilewidget2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui/profile') diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 6713d5bcb..d631e3cc1 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -446,7 +446,7 @@ void ProfileWidget2::setupItem(AbstractProfilePolygonItem *item, DiveCartesianAx void ProfileWidget2::setupSceneAndFlags() { - setScene(new QGraphicsScene()); + setScene(new QGraphicsScene(this)); scene()->setSceneRect(0, 0, 100, 100); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); -- cgit v1.2.3-70-g09d2