PDA

View Full Version : QMediaplayer Sound status



digimonkey
16th March 2015, 09:56
Hello!

I have a new question that I hope someone could help me out.

How can I test my QMediaPlayer status?

WARNING PSEUDO CODE INCOMING!!



QMediaPlayer ErrorSound;
if(ErrorSound == QMediaPlayer::EndOfMedia)
{
make things
}


Thank you in advance!

UPDATE

I cant test it right now but I think this will solve it, can someone tell their opinion?


QMediaPlayer ErrorSound;
if(ErrorSound->mediaStatus() == 7) // value = 7 ---->Playback has reached the end of the current media. The player is in the StoppedState.
{
make things
}


Thank you!