code: def on_directory_button_tool_clicked(self):
          
          # noinspection PyCallByClass,PyTypeChecker
          # set up parameter from dialog
          input_path = self.layer.currentLayer().source()
          input_directory, self.output_filename = os.path.split(input_path)
          file_extension = os.path.splitext(self.output_filename)[1]
          self.output_filename = os.path.splitext(self.output_filename)[0]
          # show Qt file directory dialog
          output_path, __ = QtWidgets.QFileDialog.getSaveFileName(
              self,
              self.tr('Output file'),
              '%s_multi_buffer%s' % (
                  os.path.join(input_directory, self.output_filename),
                  file_extension),
              'GeoJSON (*.geojson);;Shapefile (*.shp)')
          # set selected path to the dialog
          self.output_form.setText(output_path)
docs: Autoconnect slot activated when directory button is clicked.