From f04c353dfb1084395ea818ecb965eedeace99649 Mon Sep 17 00:00:00 2001 From: laserpants Date: Tue, 21 Jun 2016 13:25:07 +0300 Subject: [PATCH] make sure all animations have a parent --- components/flatbutton_internal.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/components/flatbutton_internal.cpp b/components/flatbutton_internal.cpp index 350c076..7c25766 100644 --- a/components/flatbutton_internal.cpp +++ b/components/flatbutton_internal.cpp @@ -54,8 +54,8 @@ FlatButtonDelegate::FlatButtonDelegate(FlatButton *parent) QSequentialAnimationGroup *group = new QSequentialAnimationGroup(this); - QPropertyAnimation *grow = new QPropertyAnimation; - QPropertyAnimation *shrink = new QPropertyAnimation; + QPropertyAnimation *grow = new QPropertyAnimation(this); + QPropertyAnimation *shrink = new QPropertyAnimation(this); grow->setTargetObject(this); grow->setPropertyName("haloScaleFactor"); @@ -205,19 +205,19 @@ void FlatButtonDelegate::addTransition(QAbstractTransition *transition, QPropertyAnimation *animation; - animation = new QPropertyAnimation(this, "backgroundOpacity"); + animation = new QPropertyAnimation(this, "backgroundOpacity", this); animation->setDuration(150); transition->addAnimation(animation); - animation = new QPropertyAnimation(this, "backgroundColor"); + animation = new QPropertyAnimation(this, "backgroundColor", this); animation->setDuration(150); transition->addAnimation(animation); - animation = new QPropertyAnimation(this, "haloOpacity"); + animation = new QPropertyAnimation(this, "haloOpacity", this); animation->setDuration(170); transition->addAnimation(animation); - animation = new QPropertyAnimation(this, "haloSize"); + animation = new QPropertyAnimation(this, "haloSize", this); animation->setDuration(350); animation->setEasingCurve(QEasingCurve::OutCubic); transition->addAnimation(animation);