R
R
RabraBabr2017-01-24 10:28:54
Qt
RabraBabr, 2017-01-24 10:28:54

QMediaPlayer how not to play in the background?

I do something like this

rmusiclist = new QMediaPlaylist();
    rmusiclist->addMedia(QUrl("qrc:/Music/somemusic.mp3"));
    rmusiclist->setPlaybackMode(QMediaPlaylist::Loop);
    rmusic = new QMediaPlayer();
    rmusic->setPlaylist(rmusiclist);
    rmusic->setVolume(80);
    rmusic->play();

I'm launching. Everything works, music plays. How to do what would not play in the background?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Jacob E, 2017-01-24
@Zifix

What is the question? How to catch the application going into the background, loss of focus?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question