Hi, a more sophisticated way to filter a list would be to use a QSortFilterProxyModel with QStringListModel and QListView. But with your code: First the slot receives ui->txtSearch->text() as a parameter, so there is no need to query it again. Inside the loop do something have a look at: QRegExp in general and specific QRegExp::exactMatch(), QRegExp::setPatternSyntax() with QRegExp::Wildcard.
Bookmarks