Connect QGraphicsScene to its parrent

This is to prevent a leak of QGraphicsScene.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Anton Lundin 2014-12-18 10:47:00 -08:00 committed by Dirk Hohndel
parent 8d54c9640d
commit 1a4380c8c1

View file

@ -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);