aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data/TumblerListView.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/controls/data/TumblerListView.qml')
-rw-r--r--tests/auto/controls/data/TumblerListView.qml12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/auto/controls/data/TumblerListView.qml b/tests/auto/controls/data/TumblerListView.qml
index 4e71f471..1248bec0 100644
--- a/tests/auto/controls/data/TumblerListView.qml
+++ b/tests/auto/controls/data/TumblerListView.qml
@@ -49,15 +49,21 @@
****************************************************************************/
import QtQuick 2.6
+import QtQuick.Controls 2.2
ListView {
anchors.fill: parent
- model: parent.model
- delegate: parent.delegate
-
snapMode: ListView.SnapToItem
highlightRangeMode: ListView.StrictlyEnforceRange
preferredHighlightBegin: height / 2 - (height / parent.visibleItemCount / 2)
preferredHighlightEnd: height / 2 + (height / parent.visibleItemCount / 2)
clip: true
+ model: parent.model
+ delegate: Text {
+ objectName: text
+ text: "Custom" + modelData
+ opacity: 1.0 - Math.abs(Tumbler.displacement) / (Tumbler.tumbler.visibleItemCount / 2)
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ }
}