removed cancel button

This commit is contained in:
Andreas Preikschat 2011-04-02 18:14:43 +02:00
parent 958155e7d7
commit 61068e26a6
2 changed files with 3 additions and 7 deletions

View File

@ -57,8 +57,8 @@ class Ui_ShortcutListDialog(object):
self.customLayout.addStretch()
self.dialogLayout.addLayout(self.customLayout)
self.buttonBox = QtGui.QDialogButtonBox(shortcutListDialog)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel |
QtGui.QDialogButtonBox.Ok | QtGui.QDialogButtonBox.RestoreDefaults)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Ok |
QtGui.QDialogButtonBox.RestoreDefaults)
self.buttonBox.setObjectName(u'buttonBox')
self.dialogLayout.addWidget(self.buttonBox)
self.retranslateUi(shortcutListDialog)

View File

@ -63,11 +63,7 @@ class ShortcutListForm(QtGui.QDialog, Ui_ShortcutListDialog):
self.onRestoreDefaultsClicked)
def keyPressEvent(self, event):
if self.shortcutButton.isChecked():
event.ignore()
elif event.key() == QtCore.Qt.Key_Escape:
event.accept()
self.close()
event.ignore()
def keyReleaseEvent(self, event):
Qt = QtCore.Qt