[PyKDE] PyQt4 windowIcon

Andreas Pakulat apaku at gmx.de
Sun Mar 4 13:05:23 GMT 2007


On 04.03.07 11:36:54, Tina I wrote:
> Sibylle Koczian wrote:
> >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 
> Aha! That's exactly what happens. When I change it to a single dot it works. 
> The problem is that every time i 'regenerate' the gui file with pyuic4 it 
> changes it back. But I guess I can set it in my main program instead. The 
> parent directory is not an option.
> 
> This must be a bug or are there some rational explanation for it? If the 
> application resides in "~/application/" you don't want to put random icons and 
> stuff right in the user's root.

Its not a bug, how is the directory layout for your source code? I guess
you have the .ui file in a subdir and the icon in the parent directory
of that subdir. If that is the case you need to move the icon into the
same directory as the .ui file or use Qt resource files.

Andreas

-- 
Someone is speaking well of you.




More information about the PyQt mailing list