48 Private slot called when the process finished or the user pressed the button. |
48 Private slot called when the process finished or the user pressed the button. |
49 """ |
49 """ |
50 if self.proc is not None and \ |
50 if self.proc is not None and \ |
51 self.proc.state() != QProcess.NotRunning: |
51 self.proc.state() != QProcess.NotRunning: |
52 self.proc.terminate() |
52 self.proc.terminate() |
53 QTimer.singleShot(2000, self.proc, SLOT('kill()')) |
53 QTimer.singleShot(2000, self.proc.kill) |
54 self.proc.waitForFinished(3000) |
54 self.proc.waitForFinished(3000) |
55 |
55 |
56 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) |
56 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) |
57 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) |
57 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) |
58 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) |
58 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) |