code: def get_output_from_input(self):
          
          input_path = self.input_path.text()
          if input_path.endswith('.xml'):
              output_path = input_path[:-3] + 'tif'
          elif input_path == '':
              output_path = ''
          else:
              last_dot = input_path.rfind('.')
              if last_dot == -1:
                  output_path = ''
              else:
                  output_path = input_path[:last_dot + 1] + 'tif'
          self.output_path.setText(output_path)
docs: Create default output location based on input location.