3
votes

I am trying to do some sort of operations/actions after a video of QMediaPlayer has ended. I know you can check the state of the player player->state()and that there is a state for "Stopped". But I would like to know how I can couple this state to a certain action, maybe by using a certain SIGNAL? Does anyone have experience doing this? or have an idea? I can't seem to find a solution to this. Thanks in advance.

1

1 Answers

4
votes

Have you tried the following signal QMediaPlayer::stateChanged( QMediaPlayer::State ) ? When you receive this signal QMediaPlayer::StoppedState parameter the player stopped.