def choosePathButton(self):
sender = self.sender()
if sender.objectName() == "pushButton_mediainfo_path":
lineEdit = self.findChild(QLineEdit, "lineEdit_mediainfo_path")
exe_name = "mediainfo"
elif sender.objectName() == "pushButton_mp3guessenc_path":
lineEdit = self.findChild(QLineEdit, "lineEdit_mp3guessenc_path")
exe_name = "mp3guessenc"
elif sender.objectName() == "pushButton_sox_path":
lineEdit = self.findChild(QLineEdit, "lineEdit_sox_path")
exe_name = "sox"
elif sender.objectName() == "pushButton_ffprobe_path":
lineEdit = self.findChild(QLineEdit, "lineEdit_ffprobe_path")
exe_name = "ffprobe"
elif sender.objectName() == "pushButton_aucdtect_path":
lineEdit = self.findChild(QLineEdit, "lineEdit_aucdtect_path")
exe_name = "aucdtect"
if lineEdit is not None:
path = lineEdit.text()
file = str(QFileDialog.getOpenFileName(parent=self, caption=self.tr("Browse to")+" {} ".format(exe_name)+self.tr("executable file"),
directory=path)[0])
if not file == "":
lineEdit.setText(file)
评论列表
文章目录