Prevent leak by connecting object to its parrent

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 08:47:48 +01:00 committed by Dirk Hohndel
parent d812d7b1f6
commit bdea7dd0d6

View file

@ -126,7 +126,7 @@ void ToolTipItem::expand()
nextRectangle.setWidth(width); nextRectangle.setWidth(width);
nextRectangle.setHeight(height); nextRectangle.setHeight(height);
QPropertyAnimation *animation = new QPropertyAnimation(this, "rect"); QPropertyAnimation *animation = new QPropertyAnimation(this, "rect", this);
animation->setDuration(100); animation->setDuration(100);
animation->setStartValue(rectangle); animation->setStartValue(rectangle);
animation->setEndValue(nextRectangle); animation->setEndValue(nextRectangle);