eric6/UI/DeleteFilesConfirmationDialog.py

changeset 8143
2c730d5fd177
parent 7923
91e843545d9a
child 8218
7c09585bd960
equal deleted inserted replaced
8141:27f636beebad 8143:2c730d5fd177
27 """ 27 """
28 super(DeleteFilesConfirmationDialog, self).__init__(parent) 28 super(DeleteFilesConfirmationDialog, self).__init__(parent)
29 self.setupUi(self) 29 self.setupUi(self)
30 self.setModal(True) 30 self.setModal(True)
31 31
32 self.buttonBox.button(QDialogButtonBox.Yes).setAutoDefault(False) 32 self.buttonBox.button(
33 self.buttonBox.button(QDialogButtonBox.No).setDefault(True) 33 QDialogButtonBox.StandardButton.Yes).setAutoDefault(False)
34 self.buttonBox.button(QDialogButtonBox.No).setFocus() 34 self.buttonBox.button(
35 QDialogButtonBox.StandardButton.No).setDefault(True)
36 self.buttonBox.button(
37 QDialogButtonBox.StandardButton.No).setFocus()
35 38
36 self.setWindowTitle(caption) 39 self.setWindowTitle(caption)
37 self.message.setText(message) 40 self.message.setText(message)
38 41
39 self.filesList.addItems(files) 42 self.filesList.addItems(files)
42 """ 45 """
43 Private slot called by a button of the button box clicked. 46 Private slot called by a button of the button box clicked.
44 47
45 @param button button that was clicked (QAbstractButton) 48 @param button button that was clicked (QAbstractButton)
46 """ 49 """
47 if button == self.buttonBox.button(QDialogButtonBox.Yes): 50 if button == self.buttonBox.button(
51 QDialogButtonBox.StandardButton.Yes
52 ):
48 self.accept() 53 self.accept()
49 elif button == self.buttonBox.button(QDialogButtonBox.No): 54 elif button == self.buttonBox.button(
55 QDialogButtonBox.StandardButton.No
56 ):
50 self.reject() 57 self.reject()

eric ide

mercurial