Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
src_corelib_tools_qeasingcurve.cpp
Go to the documentation of this file.
1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4#include <QEasingCurve>
5#include <QDebug> // check if it is needed
6#include <QPropertyAnimation>
7
8//! [typedef]
9qreal myEasingFunction(qreal progress);
10//! [typedef]
11
13{
14 //! [0]
15 QEasingCurve easing(QEasingCurve::InOutQuad);
16
17 for (qreal t = 0.0; t < 1.0; t += 0.1)
18 qWarning() << "Effective progress" << t << "is"
19 << easing.valueForProgress(t);
20 //! [0]
21
22 //! [1]
23 QPropertyAnimation animation;
24 animation.setStartValue(0);
25 animation.setEndValue(1000);
26 animation.setDuration(1000);
27 animation.setEasingCurve(QEasingCurve::InOutQuad);
28 //! [1]
29}
bool examples()
[3]
qreal myEasingFunction(qreal progress)
[typedef]