Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

gui_key1.py 686 B

123456789101112131415161718192021222324252627282930
  1. import sys
  2. from PyQt5 import QtCore, QtWidgets
  3. from PyQt5.QtWidgets import QApplication
  4. class Example(QtWidgets.QWidget):
  5. def __init__(self):
  6. super(Example, self).__init__()
  7. self.setGeometry(300, 300, 250, 150)
  8. self.show()
  9. def keyPressEvent(self, event):
  10. if event.key() == QtCore.Qt.Key_Q:
  11. print("Button pressed")
  12. self.deleteLater()
  13. elif event.key() == QtCore.Qt.Key_Enter:
  14. self.proceed()
  15. event.accept()
  16. def proceed(self):
  17. print("Call Enter Key")
  18. def main():
  19. app = QApplication(sys.argv)
  20. ex = Example()
  21. sys.exit(app.exec_())
  22. if __name__ == '__main__':
  23. main()