PDA

View Full Version : What happens with the connections when I hide a widget?



Dark_Tower
21st March 2006, 16:31
Hi all, I want to know what happens with the connections of a widget when I hide it: If the signal arrives when the widget is hidden, the slot connected to this signal is executed? or maybe the widget (or the application) put it in a queue of slots to execute them when the widget is shown again? or simply it discards the signal? I think that the slot is executed but I want to know it exactly.

Thanks.

jacek
21st March 2006, 16:33
The slot will be executed.

wysota
21st March 2006, 16:33
Hi all, I want to know what happens with the connections of a widget when I hide it: If the signal arrives when the widget is hidden, the slot connected to this signal is executed?
Yes, the slot gets executed. Remember, that signals are QObject oriented, not QWidget oriented, so they don't "see" the target (unless a particular slot checks if the widget is hidden, but still the slot gets executed, just does nothing).

Dark_Tower
21st March 2006, 17:48
Thanks both, now I've got it clear :)