qcompleter

Extending a QCompleter to show additional information

前提是你 提交于 2019-12-08 21:42:28
I have a QCompleter using my own QAbstractItemModel to help autocomplete a QLineEdit. It works great. I was wondering how I might go to add additional data displayed in the QCompleter's list of suggestions. For example, the kind of stuff shown in NetBeans when you press Ctrl+space: Is there a way to subclass QCompleter to get it to show additional data? 来源: https://stackoverflow.com/questions/24958472/extending-a-qcompleter-to-show-additional-information

Extending a QCompleter to show additional information

為{幸葍}努か 提交于 2019-12-08 04:12:57
问题 I have a QCompleter using my own QAbstractItemModel to help autocomplete a QLineEdit. It works great. I was wondering how I might go to add additional data displayed in the QCompleter's list of suggestions. For example, the kind of stuff shown in NetBeans when you press Ctrl+space: Is there a way to subclass QCompleter to get it to show additional data? 来源: https://stackoverflow.com/questions/24958472/extending-a-qcompleter-to-show-additional-information

Fail to clear QLineEdit after selecting item from QCompleter

瘦欲@ 提交于 2019-12-04 20:11:35
using PopupCompletion mode when you select an item (using arrow keys) and press return - lineEdit should become empty (i clear lineEdit when return is pressed), but lineEdit does not become empty. (If you press 'Enter' again it will empty the lineEdit). So i think pressing return does clear lineEdit, but pressing return also tells QCompleter to insert selected item into lineEdit, so it seems like nothing happens. But, if you click the item insted of selecting it with arrows - everything works fine. I tried to find the solution on the internet, but i found only one person that had the same

pyqt5 autocomplete QLineEdit - Google places autocomplete

不想你离开。 提交于 2019-12-04 02:06:23
问题 I am trying to create something like this (autocomplete places) in pyqt5 QLineEdit. There is a class called QCompleter with which i can suggest the content, but it requires an already formed list, but this google places api is a suggestion based function, how can i send each keystroke to google api and get the suggestion back and load in Qtextedit, is there a better way to do it 回答1: For this case you can create a custom model that makes a request using Place Autocomplete, and set that model

QComboBox with autocompletion works in PyQt4 but not in PySide

自作多情 提交于 2019-12-02 12:29:02
问题 I've got a combo box with a custom completer that worked fine in PyQt4, but isn't working in PySide. I have verified that the new completer is replacing the QComboBox's built in completer because inline completion is no longer occurring. However when run with PySide, the completer doesn't popup with a filtered list of options. I've also tried ensuring that all text is all str or all unicode to avoid differences between the PyQt API 1 with QStrings and PySide's use of Python unicode types.

QComboBox with autocompletion works in PyQt4 but not in PySide

試著忘記壹切 提交于 2019-12-02 06:19:58
I've got a combo box with a custom completer that worked fine in PyQt4, but isn't working in PySide. I have verified that the new completer is replacing the QComboBox's built in completer because inline completion is no longer occurring. However when run with PySide, the completer doesn't popup with a filtered list of options. I've also tried ensuring that all text is all str or all unicode to avoid differences between the PyQt API 1 with QStrings and PySide's use of Python unicode types. Changing the text types has had no effect on either PyQt or PySide's behavior (PyQt keeps working, PySide

QCompleter for large models

烂漫一生 提交于 2019-12-02 02:20:44
QCompleter works slightly slow on large data sets (large models): when I start to input characters in QCombobox it passes few seconds to show auto-complete popup with variants, when input 2nd char QCompleter does not react on key press for few seconds as well. Next characters works fine. Model size is about 100K records. Is it possible to improve QCompleter performance or show popup after 2nd or 3rd input symbol? Are there some good examples? Aleksey Kontsevich Solution appears similar to this: https://stackoverflow.com/a/33404207/630169 as QCompleter also uses QListView in its popup() . So

QCompleter Custom Completion Rules

假如想象 提交于 2019-11-26 18:49:47
I'm using Qt4.6 and I have a QComboBox with a QCompleter in it. The usual functionality is to provide completion hints (these can be in a dropdown rather than inline - which is my usage) based on a prefix. For example, given chicken soup chilli peppers grilled chicken entering ch would match chicken soup and chilli peppers but not grilled chicken . What I want is to be able to enter ch and match all of them or, more specifically, chicken and match chicken soup and grilled chicken . I also want to be able to assign a tag like chs to chicken soup to produce another match which is not just on the

QCompleter Custom Completion Rules

假装没事ソ 提交于 2019-11-26 06:37:57
问题 I\'m using Qt4.6 and I have a QComboBox with a QCompleter in it. The usual functionality is to provide completion hints (these can be in a dropdown rather than inline - which is my usage) based on a prefix. For example, given chicken soup chilli peppers grilled chicken entering ch would match chicken soup and chilli peppers but not grilled chicken . What I want is to be able to enter ch and match all of them or, more specifically, chicken and match chicken soup and grilled chicken . I also