Skip to content

Instantly share code, notes, and snippets.

@peroon
Created August 29, 2017 23:11
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peroon/7ce1684ed0fc803ef6b35fab87f47105 to your computer and use it in GitHub Desktop.
Save peroon/7ce1684ed0fc803ef6b35fab87f47105 to your computer and use it in GitHub Desktop.
from PyQt5.QtCore import Qt
class LabelingTool(QWidget):
def __init__(self):
super().__init__()
def keyPressEvent(self, event):
key = event.key()
if key == Qt.Key_Escape:
print('esc')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment