From 982a0384b261f9bb0883f592af98d67277e74443 Mon Sep 17 00:00:00 2001 From: Nils Date: Thu, 14 Jul 2022 19:17:36 +0200 Subject: [PATCH] update template --- template/qtgui/mainwindow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/qtgui/mainwindow.py b/template/qtgui/mainwindow.py index 8e6f4a3..ec3a3c9 100644 --- a/template/qtgui/mainwindow.py +++ b/template/qtgui/mainwindow.py @@ -377,7 +377,7 @@ class MainWindow(QtWidgets.QMainWindow): This event filter somehow does not differentiate between numpad on or numpad off. There maybe is another qt check for that. """ - if (not self.menu.ui.menubar.activeAction()) and event.type() == 51 and type(event) is QtGui.QKeyEvent and event.modifiers() == QtCore.Qt.KeypadModifier and event.text() and event.text() in "0123456789": + if (not self.menu.ui.menubar.activeAction()) and event.type() == QtCore.QEvent.ShortcutOverride and type(event) is QtGui.QKeyEvent and event.modifiers() == QtCore.Qt.KeypadModifier and event.text() and event.text() in "0123456789": action = self.menu.hoverShortcutDict[event.text()] if action: action.trigger()