From 30507d9e29e31fdda10eb707ecbf1192e1be1621 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 22 May 2013 12:03:30 +0900 Subject: [PATCH] when enter hit, close completer and don't complete (#763) --- aqt/tagedit.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aqt/tagedit.py b/aqt/tagedit.py index 0744a8cf4..46b8e2cbb 100644 --- a/aqt/tagedit.py +++ b/aqt/tagedit.py @@ -34,6 +34,9 @@ class TagEdit(QLineEdit): self.showCompleter() def keyPressEvent(self, evt): + if evt.key() in (Qt.Key_Enter, Qt.Key_Return): + self.hideCompleter() + return QLineEdit.keyPressEvent(self, evt) if not evt.text(): # if it's a modifier, don't show