eric6/PipInterface/PipDialog.py

changeset 7828
4588940a2c19
parent 7826
704c46e040a2
child 7900
72b88fb20261
child 7924
8a96736d465e
equal deleted inserted replaced
7827:3d42837a8b66 7828:4588940a2c19
87 def __cancel(self): 87 def __cancel(self):
88 """ 88 """
89 Private slot to cancel the current action. 89 Private slot to cancel the current action.
90 """ 90 """
91 self.__processQueue = [] 91 self.__processQueue = []
92 92 self.__finish()
93 if (
94 self.proc is not None and
95 self.proc.state() != QProcess.NotRunning
96 ):
97 self.proc.terminate()
98 QTimer.singleShot(2000, self.proc.kill)
99 self.proc.waitForFinished(3000)
100
101 self.proc = None
102
103 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True)
104 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False)
105 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True)
106 self.buttonBox.button(QDialogButtonBox.Close).setFocus(
107 Qt.OtherFocusReason)
108 93
109 @pyqtSlot(QAbstractButton) 94 @pyqtSlot(QAbstractButton)
110 def on_buttonBox_clicked(self, button): 95 def on_buttonBox_clicked(self, button):
111 """ 96 """
112 Private slot called by a button of the button box clicked. 97 Private slot called by a button of the button box clicked.

eric ide

mercurial