Details
-
Bug
-
Resolution: Done
-
P4: Low
-
None
-
4.7.4
-
None
-
d08fb44d8f1414bbf519875fd872d742c41300ec
Description
Run the code below and observe the correct layout.
Then comment out the "PathPercent
" line at the end and run again.
For some reason this yields a different result, which seems incorrect.
import QtQuick 1.1 Rectangle { width: 360 height: 480 PathView { anchors.fill: parent dragMargin: 1000 preferredHighlightBegin: 0.028 preferredHighlightEnd: 0.028 highlightRangeMode: PathView.StrictlyEnforceRange model: 4 interactive: false delegate: Rectangle { color: "red" width: 40 height: 40 Text { anchors.centerIn: parent text: index color: parent.PathView.isCurrentItem ? "black" : "white" font.pixelSize: 20 } MouseArea { anchors.fill: parent onClicked: { while(parent.PathView.view.currentIndex != index) { parent.PathView.view.incrementCurrentIndex(); } } } } path: Path { startX: -20; startY: 100 PathLine { x: 360/2; y: 100 } PathPercent { value: 0.1 } PathLine { x: 360+20; y: 100 } PathPercent { value: 1 } // Why is this not implied? } } }