Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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]
9
qreal
myEasingFunction
(qreal progress);
10
//! [typedef]
11
12
void
examples
()
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
}
examples
bool examples()
[3]
Definition
src_corelib_global_qglobal.cpp:56
myEasingFunction
qreal myEasingFunction(qreal progress)
[typedef]
qtbase
src
corelib
doc
snippets
code
src_corelib_tools_qeasingcurve.cpp
Generated on
for Qt by
1.18.0