code: def auto_connect(self):
          
          for o in dir(self):
              if o.startswith('_on_') and '__' in o:
                  func = getattr(self, o)
                  wgt, sig = o.split('__')
                  if self._do_connection(wgt[4:], sig, func):
                      print('Failed to connect', o)
  
              if o.startswith('_when_') and '__' in o:
                  func = getattr(self, o)
                  lst, sig = o.split('__')
                  lst = self._process_list(lst[5:])  #5 to keep _ at beggining
                  for w in lst:
                      if self._do_connection(w, sig, func):
                          print('Failed to connect', o)
docs: Make a connection between every member function to a GUI signal.
  
          Every member function whose name is in format:
  
          '_on_' + <widget_name> + '__' + <widget_signal_name>
  
          are connected to the signal of a GUI widget if it exists.
  
          Also, every function with format:
  
          '_when_' + <group_name> + '__' + <widget_signal_name>
  
          should also define a string named: '_' + <group_name> on class level
  
          _group1 = 'btn_add, btn_remove, `btn_l.+`, btn_test'
          _when_group1__clicked(self):
              who = self.sender()
              #use who to discover who called this callback
  
          inside the string you can use regex surronded by `` to select related widgets