def _on_select_path_file(self): path = QFileDialog().getOpenFileName(self, 'Add file path to be served by the file server', os.path.expanduser('~')) self._path_bar.setCurrentText(path[0])