I am developing an add-on widget for Orange3. Is there any way to handle the event of connection/disconnection of widget output?
I would like to postpone heavy calculations for one of the outputs until this output is connected with the input of another widget.
As far as I know, there is no signal (Orange3 employs PyQt's signals & slots) in source widget about it being connected with another one.
But you can always postpone heavy computation by hiding it in lazy properties or starting this computation within the receiving widget.
class TargetWidget(OWWidget):
@Inputs.obj
def set_obj(self, obj):
# start computation here
obj.compute()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With