[PyQt] python cxfreeze package pyqt app lost icon and tray icon

Hans-Peter Jansen hpj at urpla.net
Thu Sep 16 13:32:55 BST 2010


On Thursday 16 September 2010, 13:30:28 Von wrote:
> Hi Hans,strange thing happens
> I put my icon.jpg file into the qrc file and compile it to py file.when I
> run my Main.py directly I can see the icon show up correctly,but while I
> use cxfreeze to package it,then it can't find the resource at all.Here is
> my simple code:
> pixmap = QtGui.QPixmap(":/icon.jpg") #:/icon.jpg is my resource name.
> assert(pixmap.isNull() == False)  --> #this line raise AssertionError

You need to include the module, you created beforehand.

It might be, that cx_freeze misses other modules/libs as well. Did something 
appear on the DOS shell, if running from there?

Pete


More information about the PyQt mailing list