summaryrefslogtreecommitdiffstats
path: root/examples/widgets/animation/easing/window.cpp
diff options
context:
space:
mode:
authorJan Arve Sæther <jan-arve.saether@qt.io>2022-09-08 12:56:24 +0200
committerJan Arve Sæther <jan-arve.saether@qt.io>2022-09-15 17:57:54 +0200
commit30947c7fd4dddd76b69a3aa11567e27174d7a3ea (patch)
tree50e04da908680f8986c50b873e158535ccd872be /examples/widgets/animation/easing/window.cpp
parentf2a2800b37f91069959dad74d4cd186f72e57695 (diff)
Pass a parent pointer to the Animation instance to avoid memory leak
The leak is just on termination, but we should show good practices in our examples Pick-to: 6.4 6.3 6.2 Change-Id: I39abb7545d3c68a1a537b865ba3fcb5e60c22fbf Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Diffstat (limited to 'examples/widgets/animation/easing/window.cpp')
-rw-r--r--examples/widgets/animation/easing/window.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/widgets/animation/easing/window.cpp b/examples/widgets/animation/easing/window.cpp
index 260efa78329..11929738aed 100644
--- a/examples/widgets/animation/easing/window.cpp
+++ b/examples/widgets/animation/easing/window.cpp
@@ -35,7 +35,7 @@ Window::Window(QWidget *parent)
m_scene.addItem(m_item);
m_ui.graphicsView->setScene(&m_scene);
- m_anim = new Animation(m_item, "pos");
+ m_anim = new Animation(m_item, "pos", this);
m_anim->setEasingCurve(QEasingCurve::OutBounce);
m_ui.easingCurvePicker->setCurrentRow(int(QEasingCurve::OutBounce));