PDA

View Full Version : To show all items from combobox using wildcard character *



Sanjay123
28th September 2011, 15:40
I have a combo box having many items like A, AB, C, AC, AD, BA etc

As i type any letter(suppose A) in combobox it display the list of all items starting with that letter(Strating with A), it is ok.

//word list contains all items of combobx
QCompleter *completer = new QCompleter(wordList, this);
completer->completionModel();
completer->setCaseSensitivity(Qt::CaseInsensitive);
comboBox->setCompleter(completer);


But now i want that if i type *(star) it should show all items in the list of combobox.
If i type A*B (A star B) it should show the list of all items starting with A and Ending with B.

any clue or any method that can do it.

Thank you