106 the user pressed the button. |
106 the user pressed the button. |
107 """ |
107 """ |
108 if self.process is not None and \ |
108 if self.process is not None and \ |
109 self.process.state() != QProcess.NotRunning: |
109 self.process.state() != QProcess.NotRunning: |
110 self.process.terminate() |
110 self.process.terminate() |
111 QTimer.singleShot(2000, self.process, SLOT('kill()')) |
111 QTimer.singleShot(2000, self.process.kill) |
112 self.process.waitForFinished(3000) |
112 self.process.waitForFinished(3000) |
113 |
113 |
114 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) |
114 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) |
115 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) |
115 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) |
116 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) |
116 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) |