2

I am trying to implement effects like here: https://www.google.com/design/spec/patterns/swipe-to-refresh.html

So I need the information, when the user drags the contents of a flickable away from the boundaries, but I do not want the flickable to display the gap (there should be no gap between the content and the border of the flickable).

All examples I could find use the "contentY" property of the flickable to determine the overshooting. If it is negativ, there is a boundary between the flickable border and the content .

But to prevent the visual gap, I set boundsBehavior: Flickable.StopAtBounds, which I will prevent contentY from ever getting negative, disallowing me to detect the dragging.

So how can this be done in QML?

Nathan
  • 7,099
  • 14
  • 61
  • 125
  • `Flickable.DragOverBounds`? It seems to me it's exactly what you are searching for since it does not overshoot. – BaCaRoZzo Nov 06 '15 at 11:09
  • @BaCaRoZzo I believe my question was unclear, and I edited it to make it more clear. "Overshooting" was the wrong word (I think). Instead I do not want a gap between the content and the border of the flickable. – Nathan Nov 06 '15 at 11:29
  • Well, got now. You have to implement the correct behaviour yourself. At the moment I cannot think about a ready-made built-in solution for your problem. I think you can mix `Flickable` with other touch types (`MultiPointTouchArea`? `PinchArea`?) and swiitch between handling the flicking and the drag. That could be a little bit tricky to handle but feasible. Hope someone else can add some ideas about that. – BaCaRoZzo Nov 06 '15 at 13:32

0 Answers0