110 Private slot called when the process finished. |
110 Private slot called when the process finished. |
111 |
111 |
112 It is called when the process finished or |
112 It is called when the process finished or |
113 the user pressed the button. |
113 the user pressed the button. |
114 """ |
114 """ |
115 if self.process is not None and \ |
115 if ( |
116 self.process.state() != QProcess.NotRunning: |
116 self.process is not None and |
|
117 self.process.state() != QProcess.NotRunning |
|
118 ): |
117 self.process.terminate() |
119 self.process.terminate() |
118 QTimer.singleShot(2000, self.process.kill) |
120 QTimer.singleShot(2000, self.process.kill) |
119 self.process.waitForFinished(3000) |
121 self.process.waitForFinished(3000) |
120 |
122 |
121 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) |
123 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) |