Visibility of delegate in pathview in QML
-
import QtQuick 2.12
import QtQuick.Window 2.12
Rectangle{
anchors.fill: parent
id: myView
PathView {
id:myList
anchors.fill:parent
anchors.verticalCenter: parent.verticalCenter
property int widthAllList: (widthItemSelect+widthItemNotSelect(model-1))
property int widthItemSelect: 350
property int widthItemNotSelect: 350
preferredHighlightBegin: 0.3
preferredHighlightEnd: 0.3
model: 10
delegate: Rectangle{
id:contentRect
width: 300;
height: parent.height-200
color:"red"
radius: 200
}
path: Path {
id:myPath
startX: (myView.width-myList.widthAllList)/2
startY: myView.height/2
PathLine { x: myPath.startX+myList.widthAllList; y:myView.height/2 }
}
}**Hi All,
When the first Index (center rectangle) of delegate is visible the half delegate i.e last index (left Side) which is displaying should not be visible where as when last index (center rectangle) delegate is displayed the displaying half delegate of first index (right side) should not be visible. When delegate is out of screen the object is destroyed!