[PyQt] the mechanism behind qt signal and slot
Algis Kabaila
akabaila at pcug.org.au
Sun Sep 19 22:52:03 BST 2010
On Monday 20 September 2010 04:03:44 Andreas Pakulat wrote:
> >
> > That's true, but what happens if the slot does not handle the signal?
>
> This cannot happen. A signal-slot connection is a direct (or indirect)
> function call. So if you emit a signal _all_ connected slots will be
> executed, always (unless you block signal emission).
>
> > Why it may not handle it, I have no idea. May be a programming
> > mistake or whatever. I seem to recall statement that if the signal is
> > NOT handled, then the signal propagates in the tree up to the root.
>
> This is the case only for events, for an event the receiver can decide
> to accept it or not. If he doesn't accept it the event-propagation
> mechanism is going to give its parent a chance to handle it until there
> is no parent anymore at which point it'll be thrown away too.
>
> Andreas
Thank you for the clarification,
Al.
--
OldAl
akabaila at pcug.org.au
More information about the PyQt
mailing list