0

Tell me please what may be wrong.

I wrote desktop app for playing sound using Qt5Multimedia. While I compile app in QtCreator it's forks fine. But if I start .exe file sound not playing. If I try to play any sound I get this error: "The QMediaPlayer object does not have a valid service"

If I add Qt+=multimedia in .pro file I get this error:

DirectShowPlayerService::doSetUrlSource: Unresolved error code 800c0006

So I add in .pro file: Qt+=multimediawidgets and than it's work.

I also copy DLL to the .exe file directory: Qt5MultimediaWidgets.dll Qt5Multimedia.dll

Why app work if I run it in QtCreator and not work if I run it using .exe file? Thanks.

4

1 回答 1

3

我解决这个麻烦。可能问题出在链接的 dll 中。我从运行文件夹中删除所有 dll 并将新的 dll 全部从 C:\Qt\Qt5.1.0\5.1.0\mingw48_32\bin 文件夹中。现在它的工作!

于 2013-08-08T08:03:51.010 回答