[PyKDE] Adding Qt designer image files to py2app
tcj25 at cam.ac.uk
Sun Jan 1 11:41:00 GMT 2006
Apologies if this Mac-specific question is misdirected - the PyQtMac list
seems quite dead (and I've searched its archives). The pykde archives show
occasional Mac related questions, so here goes...
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 designer) appear. I
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 someone 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 PyQt