[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] How to handle unix signals in PyQt
From:       Giovanni Bajo <rasky () develer ! com>
Date:       2009-01-28 12:04:29
Message-ID: 498049CD.30208 () develer ! com
[Download RAW message or body]

On 1/28/2009 2:20 AM, Bobby R. Ward wrote:
> I can't figure out how to handle unix signals in PyQt.
> 
> If I try to connect to the unixSignal signal of QCoreApplication,  
> nothing happens.  I've noticed that the C++ examples call 
> /watchUnixSignal/(signal_num, true) but this isn't exposed in PyQt.
> 
> If I try to use python's standard signal handlers with PyQt I run into 
> some odd situations.  If I comment out the creation of the 
> QCoreApplication the signal is trapped and everything works.  If I  
> create the QCoreApplication, it seems the signal is trapped and ignored 
> by PyQt. 
> 
> I am not even able to use SIGINT to stop the application and I'm forced 
> to use kill to quit the program.
> 
> How am I supposed to handle this?

It's not documented by Trolltech so it's not an "official" function, so 
it's not exposed in PyQt. You might want to separately raise this issue 
with Trolltech to get the function documented.

Do you really need full signal support or where you trying to do simple 
stuff like handling CTRL+C?
-- 
Giovanni Bajo
Develer S.r.l.
http://www.develer.com
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic