can you please post a example code...
i used it like this,but its not working
QString sSearch
= ui
->txtSearch
->text
();
ui->lstNamesControl->clear();
regExp.
setPatternSyntax(QRegExp::Wildcard);
for(int iIndex = 0; iIndex < lst_ListItems.count(); ++iIndex)
{
pItem->setText(lst_ListItems.at(iIndex));
if(regExp.exactMatch(pItem->text()))
ui->lstNamesControl->addItem(pItem);
QString sSearch = ui->txtSearch->text();
ui->lstNamesControl->clear();
QRegExp regExp;
regExp.setPatternSyntax(QRegExp::Wildcard);
for(int iIndex = 0; iIndex < lst_ListItems.count(); ++iIndex)
{
QListWidgetItem* pItem = new QListWidgetItem;
pItem->setText(lst_ListItems.at(iIndex));
if(regExp.exactMatch(pItem->text()))
ui->lstNamesControl->addItem(pItem);
To copy to clipboard, switch view to plain text mode
Added after 8 minutes:
ohh. my mistake... got it
Thanks Lykurg
QRegExp regExp(sSearch );
To copy to clipboard, switch view to plain text mode
Bookmarks