I am trying to switch the orientation of the swipe on some specific item/page index of the swipeview in qml. When I change the orientation using this piece of code, index changes for no reason that I know of.
SwipeView {
id: view
currentIndex: 0
anchors.fill: parent
anchors.top: parent.top
onCurrentIndexChanged: {
if(view.currentIndex === 3 || view.currentIndex === 4)
view.orientation = Qt.Vertical
else
view.orientation = Qt.Horizontal
}
//home
Item1 { }
Item2 { }
Item3 { }
Is it bug or there is something that I am doing wrong ?