[PyQt] QMovie not loading gif from resource after py2exe

Frédéric frederic.mantegazza at gbiloba.org
Sat Feb 21 10:30:34 GMT 2009


On samedi 21 février 2009, Arthur Pemberton wrote:

> I'm starting here as someone may be able to suggest something as it
> seems weird.
>
> I have a .py generated from a .qrc.
>
> I have several QActions which load PNGs successfully from my
> resources.py just fine. My .ui was done using Qt Designer.
>
> After py2exe, app seems to work just fine, including icons for the
> QActions (I have them on a toolbar). Except my dynamically loaded .gif
> no longer works.
>
> I am loading the gif into a QMovie in my __init__()
>
> self.movie = QtGui.QMovie(':/images/images/loader.gif')
>
> and attaching it to QLabels later on. That works fine pre py2exe, but
> not so much post py2exe.
>
> I was wondering if anyone knew how to fix, or at least troubleshoot
> this.

I don't see what could cause such problem... Did you check that the 
resources.py is correctly loaded by the setup.py py2exe file?

> Also, how do you guys ship your .ui files?

See my config:

http://trac.gbiloba.org/papywizard/browser/trunk/windows

-- 
    Frédéric

    http://www.gbiloba.org



More information about the PyQt mailing list