Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

[Solved] QML PathView and Pages control



  • Hello!

    I trying to create Pages control via PathView, but changing currentIndex shows incorrect page. What I'm doing wrong?

        path: Path {
            startX: - root.width * itemModel.count / 2 + root.width / 2
            startY: root.height / 2
            PathLine {
                x: root.width * itemModel.count / 2 + root.width / 2
                y: root.height / 2
            }
        }
    

    Test project

    UPD: Path is incorrect, I'm add first stub element and use X from -root.width / 2 to root.width * mainScreensModel.count - root.width / 2

    (If startX is positive, at currentIndex showing page with correct index, but page changing visually incorrect)