On Monday 13 December 2010, 19:06:49 Guruprasad wrote: > Hi all, > I am a PyQt4 beginner just in the process of learning.
Welcome to the club. > I came across > this method setWindowIcon() that is used to set the icon of a > window/dialog/widget. But calling that method before calling the > show() method doesn't set the icon, but calling it after a call to > the show() method, sets it properly. I assume, you mean show() on the top level window. > Is there any explanation for > this behaviour. In Qt, most things (related to drawing at least) happen asynchronous (e.g paint events in the event loop). On top of that, setting the window icon is finally done by the window manager, hence even more asynchronicity. What you observe is usual behavior, which might change if window managers or operating systems change. > I am using PyQt4 version available on Ubuntu 10.04 and use Gnome > desktop environment. Pete _______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt