def downloadFolderPushButtonClicked(self, button):
download_path = str(
self.persepolis_setting.value('settings/download_path'))
fname = QFileDialog.getExistingDirectory(
self, 'Select a directory', download_path)
if fname:
# Returns pathName with the '/' separators converted to separators that are appropriate for the underlying operating system.
# On Windows, toNativeSeparators("c:/winnt/system32") returns
# "c:\winnt\system32".
fname = QDir.toNativeSeparators(fname)
self.download_folder_lineEdit.setText(fname)
self.persepolis_setting.setValue(
'settings/download_path', str(fname))
评论列表
文章目录