由于您已经在Qt土地上,因此您可以执行以下操作:
from PyQt4.QtCore import QProcessclass YourClass(QObject): [...] def videoProcess(self): self.pushButton.setEnabled(0) self.pushButton.setText("Please Wait") command = "handbrake.exe" args = ["-i", "somefile.wmv", "-o", "somefile.mp4"] process = QProcess(self) process.finished.connect(self.onFinished) process.startDetached(command, args) def onFinished(self, exitCode, exitStatus): self.pushButton.setEnabled(True) [...]http://doc.qt.io/qt-5/qprocess.html



