forked from M-Labs/artiq
1
0
Fork 0

gui/shortcuts: make global shortcuts really global

This commit is contained in:
Sebastien Bourdeauducq 2015-12-01 18:49:23 +08:00
parent de54f57fbe
commit 08abc2e00a
1 changed files with 2 additions and 1 deletions

View File

@ -1,7 +1,7 @@
import logging import logging
from functools import partial from functools import partial
from quamash import QtGui from quamash import QtGui, QtCore
from pyqtgraph import dockarea from pyqtgraph import dockarea
try: try:
from quamash import QtWidgets from quamash import QtWidgets
@ -63,6 +63,7 @@ class ShortcutsDock(dockarea.Dock):
"submit": submit "submit": submit
} }
shortcut = QShortcut("F" + str(i+1), main_window) shortcut = QShortcut("F" + str(i+1), main_window)
shortcut.setContext(QtCore.Qt.ApplicationShortcut)
shortcut.activated.connect(partial(self._activated, i)) shortcut.activated.connect(partial(self._activated, i))
def _activated(self, nr): def _activated(self, nr):