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_animation_qvariantanimation.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
<
QVariantAnimation
>
5
#
include
<
QColor
>
6
7
//! [0]
8
QVariant
myColorInterpolator
(
const
QColor &start,
const
QColor &end, qreal progress)
9
{
10
// ...
11
return
QColor(
/*...*/
);
12
}
13
// ...
14
void
someFunc
()
15
{
16
// ...
17
qRegisterAnimationInterpolator<QColor>(myColorInterpolator);
18
// ...
19
}
20
//! [0]
21
22
//! [1]
23
QVariant
myInterpolator
(
const
QVariant &from,
const
QVariant &to, qreal progress);
24
//! [1]
myInterpolator
QVariant myInterpolator(const QVariant &from, const QVariant &to, qreal progress)
[0]
myColorInterpolator
QVariant myColorInterpolator(const QColor &start, const QColor &end, qreal progress)
[0]
Definition
src_corelib_animation_qvariantanimation.cpp:8
someFunc
void someFunc()
[10]
Definition
src_corelib_animation_qvariantanimation.cpp:14
qtbase
src
corelib
doc
snippets
code
src_corelib_animation_qvariantanimation.cpp
Generated on
for Qt by
1.14.0