[PyKDE] PyQt4 windowIcon

Sibylle Koczian Sibylle.Koczian at t-online.de
Sun Mar 4 10:01:13 GMT 2007


Tina I schrieb:
> 
> "pyuic4" produces this line in my 'gui file':
> 
>       MainWindow.setWindowIcon(QtGui.QIcon("../log.png"))
> 
> The icon is stored in the same directory as the application it self. I 
> guess I'm missing something, I just don't have any idea what. So if 
> somebody could provide me with a clue I would really appreciate it.
> 
I can see what's wrong (at least I think I see it). But I'm not using 
the designer, so I don't really know what to do about it. The 
setWindowIcon method expects the icon in the parent directory, not in 
the same directory as the application itself (that would be 
"./log.png"). You might simply move the icon and try again - or is that 
not an option?

HTH
Sibylle




More information about the PyQt mailing list