[PyQt] Images not showing in WebView after cx_Freeze

Hans-Peter Jansen hpj at urpla.net
Mon Jan 3 10:03:38 GMT 2011


On Monday 03 January 2011, 04:10:08 Mikael Modin wrote:
> Hi,
>
> I'm currently developing a small tool for taking and sending
> screnshots, time-reporting for freelancers, and am using cx_Freeze to
> avoid having the users install python, pyqt and all other
> dependencies.
>
> The problem I'm having is that after running the code through
> cx_Freeze images on a web page doesn't seem to work.
> 1) All I get is the grey box with a question mark inside of it.
> 2) The same setup works when I run the python code by itself without
> cx_Freeze. 3) Loading a local html-page that just contains an img-tag
> works fine, so the actual image loading and showing seem to work
> fine. Loading Google and that works, so images over network work
> fine. The server send the images in png format.
>
> These three combined leave me very confused. Has anybody else had any
> similar trouble?

Most probably, your app suffers from missing Qt image format plugins, 
or, equally likely, cx_freeze failed to include them in a way, that Qt 
is able to use them properly. 

You might try PyInstaller, that is prepared for such (Qt/PyQt) needs.

Good luck,
Pete


More information about the PyQt mailing list