mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
when enter hit, close completer and don't complete (#763)
This commit is contained in:
parent
eb3df9a067
commit
30507d9e29
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue