I'm afraid you'll have to build your own completer tailored for your model characteristics. Going through 200k entries takes time, you have to reduce that time somehow (e.g. using some kind of trie if your usecase allows it).
I'm afraid you'll have to build your own completer tailored for your model characteristics. Going through 200k entries takes time, you have to reduce that time somehow (e.g. using some kind of trie if your usecase allows it).
I have done that for a DOTNET based project where the data is fetched from a List<string> and shown up in a ListBox almost instatly(250K words). However in DotNet there is a BeginUpdate and EndUpdate method of the ListBox so that the updation of the ListBox with new results while the user types is smooth. Is there any equivalent method for QListView?
Updating of the view is unlikely the problem, filtering the model is the bottleneck. Apparently upon each change in the text the whole model is refiltered. What you need to do is either track changes or provide a faster than linear way of filtering the model. Unfortunately the latter cannot be done by subclassing QCompleter so you will have to provide your own completer class for that.
jpmgr (9th June 2014)
You can find FULL solution for such situation here: http://stackoverflow.com/a/33454284/630169
Bookmarks