--- /dev/null
+import QtQuick 1.0
+import QtGui 1.0
+
+Widget {
+ VBoxLayout {
+ PushButton {
+ id: button
+ text: anim.running ? qsTr("Stop animation") : qsTr("Start animation")
+ checkable: true
+ }
+
+ Slider {
+ id: slider
+
+ minimum: 0
+ maximum: 100
+ PropertyAnimation {
+ id: anim
+
+ running: button.checked
+ target: slider
+ property: "value"
+ from: 0
+ to: 100
+ duration: 3000
+ easing.type: Easing.InOutBounce
+ loops: Animation.Infinite
+ }
+ }
+ }
+}
timer.setInterval(1000);
timer.start();
- DeclarativeWidgetDocument document(QUrl("test.qml"));
+ //DeclarativeWidgetDocument document(QUrl("test.qml"));
+ DeclarativeWidgetDocument document(QUrl("animation.qml"));
document.setContextProperty("_timer", &timer);
QWidget *widget = document.create<QWidget>();