Sound and the using of the Resource system
This post was split off from this discussion [developer.qt.nokia.com] on certification; Andre
A huge desire to develop Qt and it’s usages further!
It has all of potential to grow.
a) When they add support QSound class can read .wav files embedded into executable ( Qt Resources)?
b) How can I put any .txt file into Resources ( embbed ) and read it via QFile?
Yes, just use qt-creator’s qrc editor or edit the file by hand to add in any file that you like.
In your app just pass in a path prefixed with a “:” to access the file from the compiled in resources. ie:
I specially ask when QSound() will open wav files from resources?
That is the question when QSound class will work with .wav files from resource system.
Probably the answer is “never”. It is documented that QSound does not support loading from resources. QSound is not marked as such, but AFAIK it is basically deprecated. Use QtMultimedia or Phonon instead.