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 text's content. I can handle the algorithm but,
Which of QCompleter's functions do I need to override?
I'm not really sure where I should be looking...
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…