diff options
author | Yann Bodson <yann.bodson@nokia.com> | 2009-10-27 03:55:34 (GMT) |
---|---|---|
committer | Yann Bodson <yann.bodson@nokia.com> | 2009-10-27 03:55:34 (GMT) |
commit | a9745ccc4d1d5e8e033a805fe1870221250f7dec (patch) | |
tree | d017c9a214edf911a9be7d3bb35272ce03db4375 /examples/declarative/listview/content/ClickAutoRepeating.qml | |
parent | b1a5b6c40c6c76d44d9afc24c6cddf1d2abf7b29 (diff) | |
download | Qt-a9745ccc4d1d5e8e033a805fe1870221250f7dec.zip Qt-a9745ccc4d1d5e8e033a805fe1870221250f7dec.tar.gz Qt-a9745ccc4d1d5e8e033a805fe1870221250f7dec.tar.bz2 |
make listview/dynamic.qml work again
Diffstat (limited to 'examples/declarative/listview/content/ClickAutoRepeating.qml')
-rw-r--r-- | examples/declarative/listview/content/ClickAutoRepeating.qml | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/examples/declarative/listview/content/ClickAutoRepeating.qml b/examples/declarative/listview/content/ClickAutoRepeating.qml index f0e7df1..796f9e3 100644 --- a/examples/declarative/listview/content/ClickAutoRepeating.qml +++ b/examples/declarative/listview/content/ClickAutoRepeating.qml @@ -4,25 +4,27 @@ Item { id: page property int repeatdelay: 300 property int repeatperiod: 75 - property bool pressed: false + property bool isPressed: false + signal pressed signal released signal clicked - pressed: SequentialAnimation { + + isPressed: SequentialAnimation { id: autoRepeat - PropertyAction { target: page; property: "pressed"; value: true } - ScriptAction { script: page.onPressed } - ScriptAction { script: page.onClicked } + PropertyAction { target: page; property: "isPressed"; value: true } + ScriptAction { script: page.pressed() } + ScriptAction { script: page.clicked() } PauseAnimation { duration: repeatdelay } SequentialAnimation { repeat: true - ScriptAction { script: page.onClicked } + ScriptAction { script: page.clicked() } PauseAnimation { duration: repeatperiod } } } MouseRegion { anchors.fill: parent onPressed: autoRepeat.start() - onReleased: { autoRepeat.stop(); parent.pressed = false; page.released } + onReleased: { autoRepeat.stop(); parent.isPressed = false; page.released() } } } |