def _select_protocol(self):
initial_dir = self._shared_state.base_dir
if self.selectedProtocolText.text() != '':
initial_dir = self.selectedProtocolText.text()
open_file, used_filter = QFileDialog().getOpenFileName(
caption='Select the protocol', directory=initial_dir,
filter=';;'.join(protocol_files_filters))
if os.path.isfile(open_file):
self.selectedProtocolText.setText(open_file)
self._shared_state.base_dir = os.path.dirname(open_file)
评论列表
文章目录