mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
Allow closing the Preview Dialog with Ctrl+Shift+P
This commit is contained in:
parent
6431f0b6b1
commit
097fa16783
1 changed files with 4 additions and 0 deletions
|
@ -16,6 +16,7 @@ from aqt.qt import (
|
|||
QIcon,
|
||||
QKeySequence,
|
||||
QPixmap,
|
||||
QShortcut,
|
||||
Qt,
|
||||
QVBoxLayout,
|
||||
QWidget,
|
||||
|
@ -63,6 +64,9 @@ class Previewer(QDialog):
|
|||
def _create_gui(self):
|
||||
self.setWindowTitle(tr(TR.ACTIONS_PREVIEW))
|
||||
|
||||
self.close_shortcut = QShortcut(QKeySequence("Ctrl+Shift+P"), self)
|
||||
qconnect(self.close_shortcut.activated, self.close)
|
||||
|
||||
qconnect(self.finished, self._on_finished)
|
||||
self.silentlyClose = True
|
||||
self.vbox = QVBoxLayout()
|
||||
|
|
Loading…
Reference in a new issue