mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-25 08:12:11 -07:00
Command+w shortcut for closing the application.
Copied from Perforce Change: 194145
This commit is contained in:
parent
6d50284823
commit
0799ee0ca0
1 changed files with 6 additions and 1 deletions
|
|
@ -15,7 +15,7 @@ from struct import Struct
|
|||
import sys
|
||||
import time
|
||||
|
||||
from matplotlib.backends.qt_compat import QtCore, QtWidgets
|
||||
from matplotlib.backends.qt_compat import QtCore, QtGui, QtWidgets
|
||||
from matplotlib.backends.backend_qt5agg import (
|
||||
FigureCanvas, NavigationToolbar2QT as NavigationToolbar)
|
||||
from matplotlib.figure import Figure
|
||||
|
|
@ -358,9 +358,14 @@ class Model(EventHandler):
|
|||
class ApplicationWindow(QtWidgets.QMainWindow):
|
||||
def __init__(self, model):
|
||||
super().__init__()
|
||||
|
||||
self._model = model
|
||||
self._main = QtWidgets.QWidget()
|
||||
self.setCentralWidget(self._main)
|
||||
|
||||
shortcut = QtWidgets.QShortcut(QtGui.QKeySequence("Ctrl+W"), self)
|
||||
shortcut.activated.connect(self.close)
|
||||
|
||||
layout = QtWidgets.QHBoxLayout(self._main)
|
||||
|
||||
self._line_checkbox = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue