aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data/TumblerPathView.qml
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2018-01-16 15:22:40 +0100
committerMitch Curtis <mitch.curtis@qt.io>2018-01-17 14:22:18 +0000
commitda7d894deb4cc36155ade5e6a1ebecc3262363f8 (patch)
tree9b8337edd90dbdf2e4601a025cd2c72161e15a44 /tests/auto/controls/data/TumblerPathView.qml
parentd61567f3cfa100aeab865bd6b436de87970575f5 (diff)
Make Tumbler compatible with deferred execution
Now that the contentItem is created at a different stage, we have to shuffle some code around and add some null checks. Task-number: QTBUG-50992 Change-Id: I34d3a9ea9cb9ab54008a1015b37b1666538c085e Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'tests/auto/controls/data/TumblerPathView.qml')
-rw-r--r--tests/auto/controls/data/TumblerPathView.qml11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/auto/controls/data/TumblerPathView.qml b/tests/auto/controls/data/TumblerPathView.qml
index 4f6f653f..7b7cd5f4 100644
--- a/tests/auto/controls/data/TumblerPathView.qml
+++ b/tests/auto/controls/data/TumblerPathView.qml
@@ -49,16 +49,23 @@
****************************************************************************/
import QtQuick 2.6
+import QtQuick.Controls 2.2
PathView {
id: pathView
- model: parent.model
- delegate: parent.delegate
clip: true
pathItemCount: parent.visibleItemCount + 1
preferredHighlightBegin: 0.5
preferredHighlightEnd: 0.5
dragMargin: width / 2
+ 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
+ }
path: Path {
startX: pathView.width / 2