def keyPressEvent(self, event: QKeyEvent) -> None: if event.key() in (Qt.Key_Enter, Qt.Key_Return): return super(Settings, self).keyPressEvent(event)