[SOLVED] Flickable.flick() doesn't work
-
Hello. I would like to slide the content of a Flickable control programmatically. Based on the documentation, I believe the flick() method is the one I need.
http://doc.qt.io/qt-5/qml-qtquick-flickable.html#flick-method
But it doesn't work. I can move the content perfectly dragging it with the mouse, but not when I call this method. Let's say I want to move it vertically. I try:
myFlickable.flick(0, 10);
And nothing happens. No error, no movement. What's wrong?
Thank you.
-
@Leonardo
flick
function takes value in pixels/sec. Flicking 10 pixels/sec will be hardly noticeable. Try some higher values. Also note that you may need to provide positive or negative value for it depending upon the direction. -
Hi. I've tried higher values and saw some movement. Then I realized that deceleration was acting on it. I thought the speed would be constant. Now I'm setting flickDeceleration to zero before calling the method and restoring it to its default value when I'm done. It works nicely.
Thank you for your help.
-
@Leonardo
Can u tell me what value u passed inside method.Actually i have ListView in horizontal direction. on Passing flick(0,-100) it moves in upward direction but is should be moved in Left or right direction. So, what values should be passed for doing this.