QParallelAnimationGroup 类提供一组平行动画。 更多...
头: | #include <QParallelAnimationGroup> |
CMake: |
find_package(Qt6 COMPONENTS Core REQUIRED)
target_link_libraries(mytarget PRIVATE Qt6::Core) |
qmake: | QT += core |
继承: | QAnimationGroup |
QParallelAnimationGroup (QObject * parent = nullptr) | |
virtual | ~QParallelAnimationGroup () |
virtual int | duration () const override |
virtual bool | event (QEvent * event ) override |
virtual void | updateCurrentTime (int currentTime ) override |
virtual void | updateDirection (QAbstractAnimation::Direction direction ) override |
virtual void | updateState (QAbstractAnimation::State newState , QAbstractAnimation::State oldState ) override |
QParallelAnimationGroup--a container for animations --starts all its animations when it is started itself, i.e., runs all animations in parallel. The animation group finishes when the longest lasting animation has finished.
You can treat QParallelAnimationGroup as any other QAbstractAnimation , e.g., pause, resume, or add it to other animation groups.
QParallelAnimationGroup *group = new QParallelAnimationGroup; group->addAnimation(anim1); group->addAnimation(anim2); group->start();
在此范例中,
anim1
and
anim2
are two
QPropertyAnimation
s that have already been set up.
另请参阅 QAnimationGroup , QPropertyAnimation ,和 动画框架 .
构造 QParallelAnimationGroup。 parent 会被传递给 QObject 的构造函数。
[虚拟]
QParallelAnimationGroup::
~QParallelAnimationGroup
()
Destroys the animation group. It will also destroy all its animations.
[override virtual]
int
QParallelAnimationGroup::
duration
() const
重实现: QAbstractAnimation::duration () const.
[override virtual protected]
bool
QParallelAnimationGroup::
event
(
QEvent
*
event
)
重实现: QAnimationGroup::event (QEvent *event).
[override virtual protected]
void
QParallelAnimationGroup::
updateCurrentTime
(
int
currentTime
)
重实现: QAbstractAnimation::updateCurrentTime (int currentTime).
[override virtual protected]
void
QParallelAnimationGroup::
updateDirection
(
QAbstractAnimation::Direction
direction
)
重实现: QAbstractAnimation::updateDirection (QAbstractAnimation::Direction direction).
[override virtual protected]
void
QParallelAnimationGroup::
updateState
(
QAbstractAnimation::State
newState
,
QAbstractAnimation::State
oldState
)
重实现: QAbstractAnimation::updateState (QAbstractAnimation::State newState, QAbstractAnimation::State oldState).