void Wt::WStackedWidget::setTransitionAnimation |
( |
const WAnimation & |
animation, |
bool |
autoReverse = false |
||
) |
指定一个在切换过程中使用的动画。
动画的作用是,在调用setCurrentIndex()时,隐藏前任当前部件,并且显示出下任当前部件。
animation 的初始值是WAnimation(),意味着没有动画。
如果autoReverse 为 true 的话,那么当下个索引在当前索引之前(按数字计)的时候,会使用反向的动画。这只对WAnimation::SlideLeft、WAnimation::SlideRight、WAnimation::SlideUp和WAnimation::SlideDown 这几个效果有效。
参考:
HxLauncher: Launch Android applications by voice commands