Allow closing the Preview Dialog with Ctrl+Shift+P

This commit is contained in:
Henrik Giesel 2021-01-10 01:34:59 +01:00
parent 6431f0b6b1
commit 097fa16783

View file

@ -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()