Invoke autosuggestion pop-up with arrow-key up/down

This commit is contained in:
Glutanimate 2017-08-30 13:13:10 +02:00
parent 153849c01b
commit a7cdff6d96

View file

@ -36,6 +36,11 @@ class TagEdit(QLineEdit):
self.showCompleter()
def keyPressEvent(self, evt):
if evt.key() in (Qt.Key_Up, Qt.Key_Down):
# show completer on arrow key up/down
if not self.completer.popup().isVisible():
self.showCompleter()
return
if (evt.key() == Qt.Key_Tab and evt.modifiers() & Qt.ControlModifier):
# select next completion
if not self.completer.popup().isVisible():