I compiled my project in MinGW x64 - release, I did it like this before. But in my project there was a need to download multimedi for music. service found for - "org.qt-project.qt.mediaplayer"

Here is the code:

const QString mu(QApplication::applicationDirPath()+bt+mus); //bt = blytype/ //mus = music/ bg_pl->addMedia(QUrl(mu+bg+"Minus"+wav)); //bg = background/ //wav = .wav bg_pl->setPlaybackMode(QMediaPlaylist::Loop); bgm->setPlaylist(bg_pl); 

Well, then play this playlist, etc.

What is the problem? If you do not add dll files, compile in the creat and run all the same from there

  • How do you collect the project? If through qmake, you have not added a media directive in .pro. Via cmake, respectively, you also probably did not find the packages. - jNX
  • Do you have any confusion with a system with different Qt? Different bit libraries? Is GStreamer installed? Here people are discussing forum.qt.io/topic/74070/… - Alexander Chernin
  • Can you please for more details about GStreamer? How to install it at all and what is it? did not find in the Internet .. - desinger58

1 answer 1

In order to connect the multimedia when building in qmake, you need to add the following parameters:

Example:

 QT += core gui QT += multimedia 

In addition, if you want to run a simple .exe file, then after assembly and compilation under the release, you need to use the utility:

 windeployqt