qsound没有声音问题

m_pAlarmSound = new QSound(":/testsound/Resources/1012.wav", this);

m_pAlarmSound->setLoops(QSound::Infinite);

m_pAlarmSound->play()

在生成的exe执行文件下面,需要添加audio\qtaudio_windows.dll 才能播放声音。

http://stackoverflow.com/questions/30099180/qt-doesnt-play-sound-on-other-devices




2 down vote accepted

The audio plugins folder: [Qt-Installation]\5.4\msvc2013\plugins\audio

  1. audio\qtaudio_windows.dll what you need
  2. audio\qtaudio_windowsd.dll is the debug library
  3. audio\qtaudio_windowsd.pdb symbols

You don't need to deploy the last two.


2 down vote accepted

The audio plugins folder: [Qt-Installation]\5.4\msvc2013\plugins\audio

  1. audio\qtaudio_windows.dll what you need
  2. audio\qtaudio_windowsd.dll is the debug library
  3. audio\qtaudio_windowsd.pdb symbols

You don't need to deploy the last two.

你可能感兴趣的:(qt)