diff options
Diffstat (limited to 'tests/auto/declarative/visual/qmlgraphicsflickable/flickable-vertical.qml')
-rw-r--r-- | tests/auto/declarative/visual/qmlgraphicsflickable/flickable-vertical.qml | 45 |
1 files changed, 43 insertions, 2 deletions
diff --git a/tests/auto/declarative/visual/qmlgraphicsflickable/flickable-vertical.qml b/tests/auto/declarative/visual/qmlgraphicsflickable/flickable-vertical.qml index a1885c4..287815f 100644 --- a/tests/auto/declarative/visual/qmlgraphicsflickable/flickable-vertical.qml +++ b/tests/auto/declarative/visual/qmlgraphicsflickable/flickable-vertical.qml @@ -17,15 +17,23 @@ Rectangle { Flickable { id: Flick - anchors.fill: parent; viewportHeight: column.height + height: parent.height-50 + width: parent.width; viewportHeight: column.height Column { id: column Repeater { model: list - Rectangle { width: 300; height: 200; color: dayColor } + Rectangle { width: 300; height: 200; color: mr.pressed ? "black" : dayColor + MouseRegion { + id: mr + anchors.fill: parent + } + } } } + clip: true + reportedVelocitySmoothing: 1000 } Rectangle { radius: 3 @@ -34,4 +42,37 @@ Rectangle { y: Flick.visibleArea.yPosition * Flick.height height: Flick.visibleArea.heightRatio * Flick.height } + + // click to toggle interactive flag + Rectangle { + width: 98 + height: 48 + y: parent.height - 50 + color: "red" + MouseRegion { + anchors.fill: parent + onClicked: Flick.interactive = Flick.interactive ? false : true + } + } + + // click to toggle click delay + Rectangle { + width: 98 + height: 48 + x: 100 + y: parent.height - 50 + color: "green" + MouseRegion { + anchors.fill: parent + onClicked: Flick.pressDelay = Flick.pressDelay > 0 ? 0 : 500 + } + } + + Rectangle { + width: Math.abs(Flick.verticalVelocity)/100 + height: 50 + x: 200 + y: parent.height - 50 + color: blue + } } |