Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
This commit is contained in:
TheJackiMonster 2022-08-09 14:37:18 +02:00
parent 2877670a53
commit 6916f27d60
No known key found for this signature in database
GPG key ID: D850A5F772E880F9

View file

@ -55,8 +55,11 @@ class completer(QWidget, Ui_completer):
self.text.setFocus(Qt.PopupFocusReason)
def submit(self):
i = self.list.currentItem()
self.activated.emit(i.data(Qt.UserRole))
item = self.list.currentItem()
if item:
self.activated.emit(item.data(Qt.UserRole))
self.hide()
def keyPressEvent(self, event):