add shortcut key to close window on osx

This commit is contained in:
Damien Elmes 2009-04-18 05:01:57 +09:00
parent c19c45ef4a
commit fcba72e40d

View file

@ -320,6 +320,10 @@ class EditDeck(QMainWindow):
if self.parent.currentCard:
self.currentCard = self.parent.currentCard
self.focusCurrentCard()
if sys.platform.startswith("darwin"):
self.macCloseShortcut = QShortcut(QKeySequence("Ctrl+w"), self)
self.connect(self.macCloseShortcut, SIGNAL("activated()"),
self.close)
def findCardInDeckModel(self, model, card):
for i, thisCard in enumerate(model.cards):