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

How do I loop video??



  • Hi All,

    Could somebody please explain how I can modify the code below so that the video loops infinitely.

    Many Thanks

    @ Rectangle {
    id: mainpane
    x: 20
    y: 160
    width: 1295
    height: 736
    color: "#ffffff"
    border.color: "#4e86c6"
    border.width: 5

        Video {
            id: video
            x: 8
            y: 8
            width: 1280
            height: 720
            autoPlay: true
            source: "/pathtovideo"
            }
    
    
        }
    }@


  • Maybe something like this:
    @
    OnStopped : {position == duration ? Position =0 ;position = position
    Play()
    }
    @

    Didn't test this though

    Hope this helps


Log in to reply