Le 12/2/2009, "Frédéric" <[email protected]> a écrit:
>> I am aware of [1] but I am not clear on how treats resources like >> images. I currently have them in the simplest/laziest form -- images >> are directly on the filesystem and linked to from within Qt Designer. >> So I was hoping for someone to point me to docs on including them >> properly in a Qt resource file (and changing my Python code >> accordingly) and how this will be affected by py2exe > >Once you resource file is compiled as a python file, using pyrcc4, you will >import it in your app as any other module, so it will be automatically >included in the py2exe build process... Sorry, I was not clear enough... In Designer, you just build resources, including the images you need. Then, you use the images from the resources, instead of the files, in your widgets. Then, use pyrcc4 to compile these resources (.qrc) as a python module (.py). Finally, in your code, just use: from myResources import qInitResources, qCleanupResources # Init qInitResources() # Code ... # Cleanup qCleanupResources() Hope this helps. -- Frédéric _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
