QCompleter: Multiple words in one line, want completion on each word individually
I'm using QCompleter to complete words in a QLineEdit. The lineedit handles the input to a command-line interface (built on AngelScript), so I must support lines like:
Item i = Item("ItemName");
I've collected all keywords and identifiers in a QStringListModel and set that as the completion model. If I type
I will get "Item" suggested to me. However, if I continue typing:
I do not get a suggestion for the second word. I'd be grateful for any ideas on how to do this.
Thanks in advance!
The default operation will not do that I think as it see full text and dont know
u want only the newly typed.
The functionality you are after seems to be very like
Thanks for the link! I will give it a shot.
If you have found the answer I would love to know it!
The answer is to write your custom completer. See @mrjj's link for details.