mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
d483fda433
commit
47c25481f2
@ -63,6 +63,9 @@ class MultiCompleteLineEdit(QLineEdit):
|
||||
c.setCaseSensitivity(Qt.CaseInsensitive)
|
||||
c.setModelSorting(QCompleter.CaseInsensitivelySortedModel)
|
||||
c.setCompletionRole(Qt.DisplayRole)
|
||||
p = c.popup()
|
||||
p.setMouseTracking(True)
|
||||
p.entered.connect(self.item_entered)
|
||||
c.popup().setAlternatingRowColors(True)
|
||||
|
||||
c.activated.connect(self.completion_selected,
|
||||
@ -81,6 +84,9 @@ class MultiCompleteLineEdit(QLineEdit):
|
||||
|
||||
# }}}
|
||||
|
||||
def item_entered(self, idx):
|
||||
self._completer.popup().setCurrentIndex(idx)
|
||||
|
||||
def text_edited(self, *args):
|
||||
self.update_completions()
|
||||
self._completer.complete()
|
||||
|
Loading…
x
Reference in New Issue
Block a user