Re: [PyKDE] Windows systray application

2005-06-29 Thread basse
Rob Knapp kirjoitti viestissään (lähetysaika tiistai, 28. kesäkuuta 2005 
17:26):

> AFAIK, QT doesn't currently have a class that allows this.  You will
> need to use the win32api call SHELL_NOTIFYICON to create the icon, and
> then I used the winEvent (I think, it's been about 2 years) to capture
> the incoming WM_ messages.

thanks for the reply! 
I tried but I just don't have enough experience on doing things like this. the 
API thing is where I get confused. and I don't really know how I should send 
or receive these calls.. 

but then I managed to find pywin32 (windows extensions for python) example on 
doing this exact thing. so now I have it working, but thru pywin32.  I 
would've wanted to just use QT for this, but atleast it works. now I have 
icon, and right-click menu even on the tray, and click there opens up my QT 
interface. 

thanks again, maybe in future it will be easier to do straight in QT too..

(and just maybe, after staring 2 weeks at the source of this pywin32 example, 
I could try to convert it to QT functions.. dont know. heh.)

.b

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] Windows systray application

2005-06-28 Thread Rob Knapp
On Tue, 2005-06-28 at 14:11 +0300, basse wrote:
> 
> Hi, I've been hunting for two days now a way to create an application with 
> PyQT
> (on winXP), that will hide itself on systray. only things I found was some
> references to WM_ messages and winEventFilters.. but no real example what that
> means. 

AFAIK, QT doesn't currently have a class that allows this.  You will
need to use the win32api call SHELL_NOTIFYICON to create the icon, and
then I used the winEvent (I think, it's been about 2 years) to capture
the incoming WM_ messages.

> and some references on QT examples of icontray-program.. but that was 
> outdated,
> and I couldn't make it work in python.. 
> 
> so, is there anyone that has managed to do this? 
> and how? 

Yes, I have.  Unfortunately the code was developed for a company I no
longer work for.  Otherwise, I would share.

There is a pure win32 example here.  The main changes are 1) create a
hidden widget, and make that the parent of the notify icon. (The parent
gets the events  you are interested in.)  Then override, winEvent (I'm
60% sure that is the name, I'm sure someone else (who has used QT more
recently than I ) would remember the correct one).  In that event
handler examine the LPARAM(again, I think) and compare to the WM_
constants you found.

This is a brief overview, but it should get you started, sorry I can't
be more help.

> 
> all information highly appreciated. 
> 
> thanks.
> 
> .b
> 
> ___
> PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
> http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
-- 
---
Rob "Myddrin" Knapp
[EMAIL PROTECTED]
http://www.myddrin.com

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


[PyKDE] Windows systray application

2005-06-28 Thread basse


Hi, I've been hunting for two days now a way to create an application with PyQT
(on winXP), that will hide itself on systray. only things I found was some
references to WM_ messages and winEventFilters.. but no real example what that
means. 
and some references on QT examples of icontray-program.. but that was outdated,
and I couldn't make it work in python.. 

so, is there anyone that has managed to do this? 
and how? 

all information highly appreciated. 

thanks.

.b

___
PyKDE mailing listPyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde