py2exe, PyQT, QtWebKit and jpeg problem

C

Carbonimax

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.
 
P

Phil Thompson

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
 
C

Carbonimax

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

http://lists.trolltech.com/qt4-preview-feedback/2008-03/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

:-/
 
D

David Boddie

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/listinfo/py2exe-users

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

David
 
Y

yang.zengguang

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
 
C

Carbonimax

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 :)
 
C

Carbonimax

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 :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top