Extending a QCompleter to show additional informat

2019-06-02 09:51发布

问题:

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?