QCompleter with Regular Expresions
-
Hi guys.... I need to use QCompleter with Regular Expression and I don't know why... to be exactly, I have a QLineEdit which I need to have the following behaviour:
Imagine that I have the folowwing list:
{"RegComp", "Testing the Qt Completer", "We are Testing Regular Expressions"}I need that when I type "Test", the completer give me:
"Testing the Qt Completer"
"We are Testing Regular Expressions"
If I type "Test Reg" the completer give me:
"We are Testing Regular Expressions"How can I do that ?? because the QCompleter doesn't have this behaviour
regards
-
Hi,
Can you show how you setup your QLineEdit + QCompleter ?
And which version of Qt are you using ?
-
Then
completer->setFilterMode(Qt::MatchContains);
should get you what you want.