Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to repeat video in Qt player
QtWS25 Last Chance

How to repeat video in Qt player

Scheduled Pinned Locked Moved General and Desktop
9 Posts 3 Posters 5.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    herculis
    wrote on last edited by
    #1

    Hellow guys i build a video player in Qt uding qmediaplayer qtmultimedia
    now i want to repeat a video which i am playing
    could any one please help me in this

    Thanks

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Marty
      wrote on last edited by
      #2

      Hello,

      never used qmediaplayer but after quickly reading the class doc maybe you can try to

      @setPosition()@

      to the beginning when receiving signal

      @mediaStatusChanged(QMediaPlayer::EndOfMedia)@

      or check with

      @mediaStatus() @

      1 Reply Last reply
      0
      • dheerendraD Offline
        dheerendraD Offline
        dheerendra
        Qt Champions 2022
        wrote on last edited by
        #3

        You can look at vidiowidget example in Qt installation under examples. It gives good idea for you.

        Dheerendra
        @Community Service
        Certified Qt Specialist
        http://www.pthinks.com

        1 Reply Last reply
        0
        • H Offline
          H Offline
          herculis
          wrote on last edited by
          #4

          Dheerendra thanks
          however videowidget example donot have repeat function

          1 Reply Last reply
          0
          • dheerendraD Offline
            dheerendraD Offline
            dheerendra
            Qt Champions 2022
            wrote on last edited by
            #5

            You need to work with QMediaPlayer. You can use the play continuously. You can make this work in combination of Play and setPosition. VideoWidget is just display. Did you check the slider and play buttons ? This itself should help you make the repeat. Repeat is nothing but calling the play continuously. Hope this helps.

            Dheerendra
            @Community Service
            Certified Qt Specialist
            http://www.pthinks.com

            1 Reply Last reply
            0
            • H Offline
              H Offline
              herculis
              wrote on last edited by
              #6

              Marty ,Dheerendra
              Thank you very much it worked for me .

              1 Reply Last reply
              0
              • dheerendraD Offline
                dheerendraD Offline
                dheerendra
                Qt Champions 2022
                wrote on last edited by
                #7

                You can move this question to SOLVED state.

                Dheerendra
                @Community Service
                Certified Qt Specialist
                http://www.pthinks.com

                1 Reply Last reply
                0
                • H Offline
                  H Offline
                  herculis
                  wrote on last edited by
                  #8

                  i have one more question related to ''repeat'' thing i want to start a video from let say after one min and stop it after 3 min and start the video again from 1 min means like a loop and video is 7 min long.Can u help me in this.

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    Marty
                    wrote on last edited by
                    #9

                    hi,

                    maybe you should start another thread. This helps in referencing the questions and answers when searching for a solution in a search engine.

                    By the way, maybe have a look at QTimer class : start the timer with method start(time) and make something in a slot when signal tiemout() is fired

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved