[Qt-interest] Playing files from resource files

Oliver.Knoll at comit.ch Oliver.Knoll at comit.ch
Tue Dec 16 14:49:37 CET 2008


Tiago Correia wrote on Tuesday, December 16, 2008 2:36 PM:

> Hi,
>
> I've created a resource file with a video file.
>
> I'm trying to open it using the QFile class, but I get and an error.

As to exclude the usual suspects: Did you make sure that the *.qrc is indeed compiled (with the Qt resource compiler), and that the resulting *.cpp file is indeed compiled and /linked/ to your application? Are you using a qmake/*.pro file approach? Maybe a ''qmake; make (dist)clean; make" helps...

Sometimes it is also helpful to look into the generated *.cpp file (which contains the embedded data): the comments there should give you a hint about what the Qt resource compiler thinks the resource path should look like.

Cheers, Oliver
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22




More information about the Qt-interest-old mailing list