[Qt-interest] Qt Resource not working with Phonon::MediaSource
Guido Seifert
Wargand at gmx.de
Mon Feb 1 01:19:52 CET 2010
Hi,
according to the docs it should be possible to embed sounds using the Qt resource system. So I tried to include an mp3 file and create a Phonon::MediaSource:
QString fileName(":/resource/ping.mp3");
Phonon::MediaSource mediaSource(fileName);
mediaSource.type() returns Phonon::MediaSource::LocalFile
and mediaSource.fileName() returns :/resource/ping.mp3
Unfortunately when I do:
Phonon::MediaObject->enqueue(mediaSource);
I get: "Could not locate media source."
The mp3 plays find when I feed it directly from the local filesystem. I doubt my embedding is wrong since the resource is found and can be opened by QFile.
Something I miss? A but?
Regards,
Guido
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
More information about the Qt-interest-old
mailing list