code: def set_templates_dir(self):
          
          is_checked = self.custom_templates_dir_checkbox.isChecked()
          if is_checked:
              # Show previous templates dir
              path = setting(
                  key='reportTemplatePath',
                  default='',
                  expected_type=str,
                  qsettings=self.settings)
          else:
              # Set the template report dir to ''
              path = ''
  
          self.leReportTemplatePath.setText(path)
          self.splitter_custom_report.setEnabled(is_checked)
docs: Auto-connect slot activated when templates dir checkbox is toggled.