Check if slot has input
-
How can I check if there's at least one signal connected to a particular slot?
I have a graph object that has 20 slots. Each slot might have a signal connected to it, but not necessarily. The object also has a legend that should show the title only of the slots that actually have something connected to them. However, the titles should be correctly displayed before the data stream starts (i.e. before the slots get any information from the source objects). Is this possible at all? -
How can I check if there's at least one signal connected to a particular slot?
I have a graph object that has 20 slots. Each slot might have a signal connected to it, but not necessarily. The object also has a legend that should show the title only of the slots that actually have something connected to them. However, the titles should be correctly displayed before the data stream starts (i.e. before the slots get any information from the source objects). Is this possible at all?@Linhares
You can find out about connected slots through the meta layer, but you should not. Your signallers should not know or care about any slotters.If you really need to do what you say, when a caller connects a slot to an object's signal why not call a method in the signaller to let it know you want a title displayed, or whatever.