defmy_decorator(func):defwrapper(self,*args,**kwargs):# do somethingreturn func(self,*args,**kwargs)
retrun wrapper
classDemo:def__init__(self):# bind the signal and function...
self.ui.pushButton_disconnect.clicked.connect(
self.robot.disconnect_devices
)...# function@my_decoratordefdisconnect_devices(self,*args):print(args)# do something