Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Playing audio with QSound in Qt for Symbian

From Wiki
Jump to: navigation, search
Article Metadata
Tested with
Devices(s): Symbian
Platform(s): S60 3rd Edition, FP1
S60 3rd Edition, FP2
S60 5th Edition
S60 5th Edition
S60 3rd Edition FP2
S60 3rd Edition FP1
Keywords: QSound, DEPLOYMENT
Created: User:Kbwiki (26 Apr 2015)
Last edited: hamishwillee (14 Jun 2013)


This article shows how to deploy a sound file on Symbian and play it using QSound.


QSound 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 DEPLOYMENT:

 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>
This page was last modified on 14 June 2013, at 04:52.
62 page views in the last 30 days.