summaryrefslogtreecommitdiffstats
path: root/examples/widgets/animation/easing
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/animation/easing')
-rw-r--r--examples/widgets/animation/easing/animation.h4
-rw-r--r--examples/widgets/animation/easing/window.cpp2
-rw-r--r--examples/widgets/animation/easing/window.h5
3 files changed, 8 insertions, 3 deletions
diff --git a/examples/widgets/animation/easing/animation.h b/examples/widgets/animation/easing/animation.h
index b6b4824583..111ad44f45 100644
--- a/examples/widgets/animation/easing/animation.h
+++ b/examples/widgets/animation/easing/animation.h
@@ -15,8 +15,8 @@ public:
CirclePath,
NPathTypes
};
- Animation(QObject *target, const QByteArray &prop)
- : QPropertyAnimation(target, prop)
+ Animation(QObject *target, const QByteArray &prop, QObject *parent = nullptr)
+ : QPropertyAnimation(target, prop, parent)
{
setPathType(LinearPath);
}
diff --git a/examples/widgets/animation/easing/window.cpp b/examples/widgets/animation/easing/window.cpp
index 260efa7832..11929738ae 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));
diff --git a/examples/widgets/animation/easing/window.h b/examples/widgets/animation/easing/window.h
index b454d1853f..ea6bb74667 100644
--- a/examples/widgets/animation/easing/window.h
+++ b/examples/widgets/animation/easing/window.h
@@ -1,6 +1,9 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+#ifndef WINDOW_H
+#define WINDOW_H
+
#include <QtWidgets>
#include "ui_form.h"
@@ -37,3 +40,5 @@ private:
Animation *m_anim;
QSize m_iconSize;
};
+
+#endif // WINDOW_H