spct_optionsdialog.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:specton 作者: somesortoferror 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号