1
0

qt paytoedit: enable up/down keys

useful if multiline, and no harm(?) otherwise
This commit is contained in:
SomberNight
2019-05-04 04:42:39 +02:00
parent aac9826e1b
commit e361a8549c

View File

@@ -106,10 +106,10 @@ class CompletionTextEdit(ButtonsTextEdit):
self.completer.complete(cr)
def is_special_key(self, e):
if self.completer != None and self.completer.popup().isVisible():
if e.key() in [Qt.Key_Enter, Qt.Key_Return]:
if self.completer and self.completer.popup().isVisible():
if e.key() in (Qt.Key_Enter, Qt.Key_Return):
return True
if e.key() in [Qt.Key_Tab, Qt.Key_Down, Qt.Key_Up]:
if e.key() == Qt.Key_Tab:
return True
return False