[PyKDE] Need to know "who" triggers a callback?

kscalet kscalet at innternet.de
Mon Nov 17 16:01:01 GMT 2003


Hi,

what would be the best approach in finding out, if a signal is send due 
to a "real" gui action
like key-presses and mouse-clicks, or due to a programmatic action like 
setButton,
setCurrentText, etc on a specific widget.
It's often needed to trigger some action only in the former case, so I 
assume, there is an easy
way to find out the "source" of action, but did not find it out myself.

Another slightly similar (well?) question, how can I find out the 
sender(widget) of an action in my
callback-function (slot-function). Normally I do not have an extra 
argument, just "self" and the
actual data, if any. This would be nice to know if I register the same 
function to various actions.

Thank you for any answer,

Karl





More information about the PyQt mailing list