How to repeat video in Qt player
-
wrote on 20 Aug 2014, 15:58 last edited by
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 thisThanks
-
wrote on 20 Aug 2014, 16:57 last edited by
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() @
-
You can look at vidiowidget example in Qt installation under examples. It gives good idea for you.
-
wrote on 21 Aug 2014, 08:30 last edited by
Dheerendra thanks
however videowidget example donot have repeat function -
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.
-
wrote on 21 Aug 2014, 10:12 last edited by
Marty ,Dheerendra
Thank you very much it worked for me . -
You can move this question to SOLVED state.
-
wrote on 21 Aug 2014, 10:57 last edited by
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.
-
wrote on 21 Aug 2014, 11:32 last edited by
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/9