ok,
my setup is like this...
i used pyuic4 from a .ui file containing a simple gui created by QTdesigner, to obtain the python code.
than i write a simple python main program to launch the qt gui imported from the previous file.
launched by hand, from CMD line it works great, it resolvs well the path of pixmaps files and it's all ok.

But when i use py2exe and obtain the .exe...it works when executed but...no shows the images....
The setup.py script i had used it's a simple copy taken from the py2exe tutorial...it looks like this:

from distutils.core import setup
import py2exe
import gui2

setup(console=['nmain.py']

i run the command : python setup.py py2exe --includes sip  to include the sip module.
nmain.py is my simple main/bootstrap code:

#!/usr/bin/env python

import os, sys, time
import PyQt4
from PyQt4 import QtCore, QtGui

from gui2 import Ui_Form 

class Main(QtGui.QMainWindow):
    def __init__(self, parent=None):
        QtGui.QMainWindow.__init__(self, None) #, QtCore.Qt.FramelessWindowHint)
        self.ui=Ui_Form()
        self.ui.setupUi(self)

def main():
    app = QtGui.QApplication(sys.argv)
    window=Main()
    window.show()
    
    sys.exit(app.exec_())

if __name__ == "__main__":
    main()

It's a simple code.....and when i launch it from the python interpeter it works fine.
  
On May 11, 2009, at 11:01 PM, Nick Gaens wrote:

You could show us some code (setup.py, .qrc)..

Nick


From: hio <hio.ng81@gmail.com>
To: py2exe-users@lists.sourceforge.net
Sent: Monday, May 11, 2009 10:56:55 PM
Subject: [Py2exe-users] Problem with PyQT4

hi all,
i'm in trouble with using pyQT4 and py2exe together...
My problem is that the .exe resulting by running the script seup.py,  
when launched works fine but
does not load the pictures i placed in my pyQT gui code.
No pixmaps were loaded and displayed nor images by QT resource  
files....any ideas? where's my mistake?

Thanks






---
Fabrizio Pistagna
mail:fabrizio.pistagna@gmail.com
mail: hio.ng81@gmail.com