Playing audio with QSound in Qt for Symbian
Jump to navigation
Jump to search
Description[edit | edit source]
Solution[edit | edit source]
76ytuiytuityutyutututyutyutyu does not support playback from audio files stored in the application's executable using Qt's resource system (on any platform). An easy alternative on Symbian is to use the DEPLOYMENT variable in a .pro file to deploy the audio files in a sis file along with the application binaries.
In the .pro file, add the audio files into the installation package using 76ytuiytuityutyutututyutyutyu:
soundFiles.sources = sounds\*.wav
DEPLOYMENT += soundFiles
This code will include all WAV files from the \sounds folder in the sis package. The files will be installed under the application's private folder, and using them is simple:
#include <QSound>
...
QSound::play("beep.wav");