|
|
06-30-2012
, 05:18 PM
|
|
Posts: 435 |
Thanked: 756 times |
Joined on Apr 2010
|
#2
|
| The Following User Says Thank You to gionni88 For This Useful Post: | ||
|
|
07-01-2012
, 12:39 AM
|
|
Posts: 602 |
Thanked: 547 times |
Joined on Nov 2009
|
#3
|
Check flicking bool property: http://doc.qt.nokia.com/4.7-snapshot...#flicking-prop
|
|
07-01-2012
, 03:12 AM
|
|
Posts: 435 |
Thanked: 756 times |
Joined on Apr 2010
|
#4
|
onVerticalVelocityChanged: console.debug(verticalVelocity)
| The Following User Says Thank You to gionni88 For This Useful Post: | ||
|
|
07-01-2012
, 05:52 AM
|
|
Posts: 348 |
Thanked: 1,110 times |
Joined on Dec 2009
|
#5
|
| The Following User Says Thank You to Wonko For This Useful Post: | ||
|
|
07-01-2012
, 12:37 PM
|
|
Posts: 602 |
Thanked: 547 times |
Joined on Nov 2009
|
#6
|
|
|
07-03-2012
, 03:18 AM
|
|
Posts: 602 |
Thanked: 547 times |
Joined on Nov 2009
|
#7
|
Page {
property bool bannerStart: false
ListView {
onContentYChanged: {
if (bannerStart && (contentY <= params.bannerMargin))
showPullDownItem();
}
onMovementStart: {
if (contentY==0) bannerStart = true;
else bannerStart = false;
}
onVerticalVelocityChanged: {
// Prevent triggering pulldown item when rebound from top boundary.
if (verticalVelocity>0) bannerStart = false;
}
onMovementEnded: {
bannerStart = false;
// trigger timer to hide pull-down item
timer.restart();
}
}
}
![]() |
| Thread Tools | Search this Thread |
|
ListView { onMovementStarted: { // trigger pull-down item showPulldownItem(contentY, verticalVelocity); } onMovementEnded: { // trigger timer to hide pull-down item timer.restart(); } } Timer { id: timer onTriggered: { pulldownItem.state = ""; } }I have googled and saw some pull-down implementations are triggered by "onMovementEnded". However, I don't like the solution because there is a significant delay before the pull-down item is invoked.