From e05511a3649b046557a61ef21cb1836627ad5449 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 9 Jan 2020 12:25:54 +0100 Subject: Pad Navigator example: Remove duplicated property animations The example created two QPropertyAnimation instances that controlled the same property; this caused a clash for some transitions. Remove the smoothFlipXRotation and smoothFlipYRotation animations; they are not needed as equivalent animations are already set as defaults for the state machine. Fixes: QTBUG-28081 Change-Id: Ifa7a09d48cd4905df720e3327914320ed74ebae6 Reviewed-by: Paul Wicking --- examples/widgets/graphicsview/padnavigator/padnavigator.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'examples/widgets/graphicsview') diff --git a/examples/widgets/graphicsview/padnavigator/padnavigator.cpp b/examples/widgets/graphicsview/padnavigator/padnavigator.cpp index b9ce2a47ca..dbf89dd318 100644 --- a/examples/widgets/graphicsview/padnavigator/padnavigator.cpp +++ b/examples/widgets/graphicsview/padnavigator/padnavigator.cpp @@ -142,24 +142,16 @@ PadNavigator::PadNavigator(const QSize &size, QWidget *parent) // Flip animation setup QPropertyAnimation *smoothFlipRotation = new QPropertyAnimation(flipRotation, "angle"); QPropertyAnimation *smoothFlipScale = new QPropertyAnimation(pad, "scale"); - QPropertyAnimation *smoothFlipXRotation = new QPropertyAnimation(xRotation, "angle"); - QPropertyAnimation *smoothFlipYRotation = new QPropertyAnimation(yRotation, "angle"); QParallelAnimationGroup *flipAnimation = new QParallelAnimationGroup(this); smoothFlipScale->setDuration(500); smoothFlipRotation->setDuration(500); - smoothFlipXRotation->setDuration(500); - smoothFlipYRotation->setDuration(500); smoothFlipScale->setEasingCurve(QEasingCurve::InOutQuad); smoothFlipRotation->setEasingCurve(QEasingCurve::InOutQuad); - smoothFlipXRotation->setEasingCurve(QEasingCurve::InOutQuad); - smoothFlipYRotation->setEasingCurve(QEasingCurve::InOutQuad); smoothFlipScale->setKeyValueAt(0, qvariant_cast(1.0)); smoothFlipScale->setKeyValueAt(0.5, qvariant_cast(0.7)); smoothFlipScale->setKeyValueAt(1, qvariant_cast(1.0)); flipAnimation->addAnimation(smoothFlipRotation); flipAnimation->addAnimation(smoothFlipScale); - flipAnimation->addAnimation(smoothFlipXRotation); - flipAnimation->addAnimation(smoothFlipYRotation); //! [7] //! [8] -- cgit v1.2.3