Browse Source

update template

master
Nils 2 years ago
parent
commit
982a0384b2
  1. 2
      template/qtgui/mainwindow.py

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

Loading…
Cancel
Save