(self, event)
| 16 | self.adjustSize() |
| 17 | |
| 18 | def keyPressEvent(self, event): |
| 19 | # This causes the fake tooltip to be closed when you hit Esc |
| 20 | if event.key() == Qt.Key_Escape: |
| 21 | print("Escape key pressed") |
| 22 | self.close() |
| 23 | event.accept() |
| 24 | else: |
| 25 | super().keyPressEvent(event) |
| 26 | |
| 27 | def showEvent(self, event): |
| 28 | # This forces the fake tooltip to be focused |