[Pythonmac-SIG] Adding Qt designer image files to py2app
tcj25 at cam.ac.uk
Wed Jan 4 00:08:13 CET 2006
Apologies for a Qt question - but it is python, mac, py2app related:
I have just started using Qt Designer (still under Qt 3.3.4). I've made a
simple form, converted it to python via pyuic, and I can subclass it and
run it. But when I do, none of the images (visible in Qt Designer) appear.
I get messages:
QPixmap::fromMimeSource: Cannot find pixmap "filenew" in the mime source factory
QPixmap::fromMimeSource: Cannot find pixmap "fileopen" in the mime source factory
QPixmap::fromMimeSource: Cannot find pixmap "filesave" in the mime source factory
QPixmap::fromMimeSource: Cannot find pixmap "print" in the mime source factory
I tried adding the image files (which are present in the directory where
I'm saving the designer forms) to my setup.py:
data_files = [ ('images', ['images/filenew', 'images/fileopen', 'images/filesave', 'images/print']) ],
When I use py2app to build this, the image files are placed into
dist/mainform.app/Contents/Resources/images, but when I open the app, Qt is
still not finding them.
Can anyone tell me what I should be doing here? Also, is the solution
different for Mac apps? I.e., should my setup.py place the images elsewhere
for linux, windows, etc?
Thanks for any help,
More information about the Pythonmac-SIG