PyQt: Win Systray issue

Phil Thompson phil at river-bank.demon.co.uk
Fri Aug 30 17:43:55 CEST 2002


Vinod Vasnani wrote:

> I've been working on an application in PyQT and Python. It has been a
> very pleasant experience. Kudos to all !
> 
> I'm at a phase where I am trying to have the application run in the
> background with a systray icon. And then be able to trap mouse click
> events on  that systray. For a start,  I'm attempting to have it such
> that a double click on the icon will launch the user-interface.
> 
> I've run into some issues that perhaps some of you may have ideas as
> to how it can be resolved.
> 
> In QT to create the systray icon,   typically the win32 api is called
> to create it and also to generate the WM_USER message. The  WM_USER
> message is typically a number that is associated with an event
> generated by the systray icon. When someone clicks the systray icons,
> the systray  will generate  the WM_USER message back  to the program.
> The winEventFilter is the function in  qapplication class which
> returns these  WM_USER windows messages and in general other messages
> that are not into  converted into qevents.
> This is an ideal function for trapping the WM_USER messages
> 
> The winEventFilter appears one possible way to handle these events in
> PyQT. However in PyQT , I'm unable to locate the wrapping of the
> winEventFilter function.
> 
> Is there an implementation of this in PyQT, or perhaps does anyone
> know of an  alternative way to implement this event handling besides
> the winEventFilter route?
> 
> Any ideas and thoughts will be appreciated.


Hmm - the second request for this in a week.

I'll implement winEventFilter() for the next version - sometime in 
September.

Phil





More information about the Python-list mailing list