Is there an example available of a QCompleter
subclass that will provide autocompletions for fragments that appear in the middle of words?
eg:
Suppose you have the wordlist { "apple", "pear", "banana" }
.
When the user types 'p'
, the suggested autocompletions should be "apple"
and "pear"
, but not banana (because "apple"
and "pear"
both contain 'p'
);
The default autocompletion will only su开发者_StackOverflow中文版ggest "pear"
.
QtCreator 1.3 (that will be release soon) will have an extended completion that will allow to find a function by indicating only capital letter. See the video : http://www.youtube.com/watch?v=TyfO-7lvy_c&feature=player_embedded.
This is a behavior near to the one you want. Since QtCreator is open source you can have a look to its source code for a real example. For now I do not know the release date of this version so you will have to wait a little to see.
精彩评论