By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,825 Members | 1,244 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,825 IT Pros & Developers. It's quick & easy.

py2exe, PyQT, QtWebKit and jpeg problem

P: n/a
hello

I have a problem with py2exe and QtWebKit :
I make a program with a QtWebKit view.
If I launch the .py directly, all images (jpg, png) are displayed but
if I compile it with py2exe I have only png images. No jpg !
No error message, nothing.

Have you a solution ? Thank you.
Jun 27 '08 #1
Share this Question
Share on Google+
8 Replies

P: n/a
On Fri, 20 Jun 2008 08:04:57 -0700 (PDT), Carbonimax <ca********@gmail.com>
wrote:
hello

I have a problem with py2exe and QtWebKit :
I make a program with a QtWebKit view.
If I launch the .py directly, all images (jpg, png) are displayed but
if I compile it with py2exe I have only png images. No jpg !
No error message, nothing.

Have you a solution ? Thank you.
At a guess, the JPEG support is implemented as a Qt plugin which you are
not including.

Phil

Jun 27 '08 #2

P: n/a
On Friday 20 June 2008 17:24, Phil Thompson wrote:
On Fri, 20 Jun 2008 08:04:57 -0700 (PDT), Carbonimax
<ca********@gmail.comwrote:
>I have a problem with py2exe and QtWebKit :
I make a program with a QtWebKit view.
If I launch the .py directly, all images (jpg, png) are displayed but
if I compile it with py2exe I have only png images. No jpg !
No error message, nothing.

Have you a solution ? Thank you.

At a guess, the JPEG support is implemented as a Qt plugin which you are
not including.
Yes, that would appear to the be most obvious cause. See here for another
report about this:

http://lists.trolltech.com/qt4-previ.../msg00064.html

David
Jun 27 '08 #3

P: n/a
On Jun 21, 12:21*am, David Boddie <da...@boddie.org.ukwrote:
On Friday 20 June 2008 17:24, Phil Thompson wrote:
On Fri, 20 Jun 2008 08:04:57 -0700 (PDT),Carbonimax
<carboni...@gmail.comwrote:
I have a problem with py2exe and QtWebKit :
I make a program with a QtWebKit view.
If I launch the .py directly, all images (jpg, png) are displayed but
if I compile it with py2exe I have only png images. No jpg !
No error message, nothing.
Have you a solution ? Thank you.
At a guess, the JPEG support is implemented as a Qt plugin which you are
not including.

Yes, that would appear to the be most obvious cause. See here for another
report about this:

http://lists.trolltech.com/qt4-previ.../msg00064.html

David
How can I do that ?
If I copy the dll in the dist directory, and I use QLibrary() and
load(),
it does work in the .py but it doesn't in .exe made with py2exe

my code :
dll = QLibrary(path_to_dll)
res = dll.load()

res == true in the .py
res == false in the .exe

:-/
Jun 27 '08 #4

P: n/a
On Jun 21, 12:21*am, David Boddie <da...@boddie.org.ukwrote:
On Friday 20 June 2008 17:24, Phil Thompson wrote:
On Fri, 20 Jun 2008 08:04:57 -0700 (PDT), Carbonimax
<carboni...@gmail.comwrote:
I have a problem with py2exe and QtWebKit :
I make a program with a QtWebKit view.
If I launch the .py directly, all images (jpg, png) are displayed but
if I compile it with py2exe I have only png images. No jpg !
No error message, nothing.
Have you a solution ? Thank you.
At a guess, the JPEG support is implemented as a Qt plugin which you are
not including.

Yes, that would appear to the be most obvious cause. See here for another
report about this:

http://lists.trolltech.com/qt4-previ.../msg00064.html

David
How can I do that ?
If I copy the dll in the dist directory, and I use QPluginLoader() and
load(),
it does work in the .py but it doesn't in .exe made with py2exe

my code :
dll = QPluginLoader(path_to_dll)
res = dll.load()

res == true in the .py
res == false in the .exe

:-/
Jun 27 '08 #5

P: n/a
On Monday 23 June 2008 15:02, Carbonimax wrote:
If I copy the dll in the dist directory, and I use QPluginLoader() and
load(),
it does work in the .py but it doesn't in .exe made with py2exe

my code :
dll = QPluginLoader(path_to_dll)
res = dll.load()

res == true in the .py
res == false in the .exe

:-/
Maybe py2exe builds executables that can't load DLLs in this way.
In any case, it might be worth asking about this on the PyQt
mailing list

http://www.riverbankcomputing.com/mailman/listinfo/pyqt

or on the py2exe mailing list

https://lists.sourceforge.net/lists/...o/py2exe-users

where there may well be people who have solved this problem
independently.

David
Jun 27 '08 #6

P: n/a
On 6月20日, 下午11时04分, Carbonimax <carboni...@gmail.comwrote:
hello

I have a problem with py2exe and QtWebKit :
I make a program with a QtWebKit view.
If I launch the .py directly, all images (jpg, png) are displayed but
if I compile it with py2exe I have only png images. No jpg !
No error message, nothing.

Have you a solution ? Thank you.

I have the same problem with you. I find a way to fix it:
1. Copy Qt plugins to the directory: $YOUR_DIST_PATH/PyQt4/plugins;
2. Copy qt.conf to youar dist directory;
3. Edit qt.conf, change Prefix to $YOUR_DIST_PATH/PyQt4

Orit
Jun 29 '08 #7

P: n/a
On Jun 29, 4:14 pm, yang.zenggu...@gmail.com wrote:
On 6月20日, 下午11时04分, Carbonimax <carboni...@gmail.comwrote:
hello
I have a problem with py2exe and QtWebKit :
I make a program with a QtWebKit view.
If I launch the .py directly, all images (jpg, png) are displayed but
if I compile it with py2exe I have only png images. No jpg !
No error message, nothing.
Have you a solution ? Thank you.

I have the same problem with you. I find a way to fix it:
1. Copy Qt plugins to the directory: $YOUR_DIST_PATH/PyQt4/plugins;
2. Copy qt.conf to youar dist directory;
3. Edit qt.conf, change Prefix to $YOUR_DIST_PATH/PyQt4

Orit
It work, thank you :)
Jul 8 '08 #8

P: n/a
On Jun 29, 4:14 pm, yang.zenggu...@gmail.com wrote:
On 6月20日, 下午11时04分, Carbonimax <carboni...@gmail.comwrote:
hello
I have a problem with py2exe and QtWebKit :
I make a program with a QtWebKit view.
If I launch the .py directly, all images (jpg, png) are displayed but
if I compile it with py2exe I have only png images. No jpg !
No error message, nothing.
Have you a solution ? Thank you.

I have the same problem with you. I find a way to fix it:
1. Copy Qt plugins to the directory: $YOUR_DIST_PATH/PyQt4/plugins;
2. Copy qt.conf to youar dist directory;
3. Edit qt.conf, change Prefix to $YOUR_DIST_PATH/PyQt4

Orit
It works, thank you :-)
Jul 8 '08 #9

This discussion thread is closed

Replies have been disabled for this discussion.