Doc: revamp Animated Tiles example

Task-number: QTBUG-60635
Change-Id: Iceb53e7c0df88bb51589a1cc86e905dbc60a856e
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
This commit is contained in:
Nico Vertriest 2017-11-23 16:20:56 +01:00
parent a24b4c7c8a
commit b4aaf3abe0
2 changed files with 7 additions and 7 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

After

Width:  |  Height:  |  Size: 154 KiB

View File

@ -48,7 +48,7 @@
**
****************************************************************************/
#include <QtWidgets>
#include <QtWidgets/QtWidgets>
#include <QtCore/qmath.h>
#include <QtCore/qrandom.h>
#include <QtCore/qstate.h>
@ -236,25 +236,25 @@ int main(int argc, char **argv)
anim->setEasingCurve(QEasingCurve::InOutBack);
group->addAnimation(anim);
}
QAbstractTransition *trans = rootState->addTransition(ellipseButton, SIGNAL(pressed()), ellipseState);
QAbstractTransition *trans = rootState->addTransition(ellipseButton, &Button::pressed, ellipseState);
trans->addAnimation(group);
trans = rootState->addTransition(figure8Button, SIGNAL(pressed()), figure8State);
trans = rootState->addTransition(figure8Button, &Button::pressed, figure8State);
trans->addAnimation(group);
trans = rootState->addTransition(randomButton, SIGNAL(pressed()), randomState);
trans = rootState->addTransition(randomButton, &Button::pressed, randomState);
trans->addAnimation(group);
trans = rootState->addTransition(tiledButton, SIGNAL(pressed()), tiledState);
trans = rootState->addTransition(tiledButton, &Button::pressed, tiledState);
trans->addAnimation(group);
trans = rootState->addTransition(centeredButton, SIGNAL(pressed()), centeredState);
trans = rootState->addTransition(centeredButton, &Button::pressed, centeredState);
trans->addAnimation(group);
QTimer timer;
timer.start(125);
timer.setSingleShot(true);
trans = rootState->addTransition(&timer, SIGNAL(timeout()), ellipseState);
trans = rootState->addTransition(&timer, &QTimer::timeout, ellipseState);
trans->addAnimation(group);
states.start();