C++ (Qt)void MainForm::findItem(QListWidget *iv, const QString &str){ QList<QListWidgetItem *> list = iv->findItems(str, Qt::MatchStartsWith); if (list.count()) { iv->setCurrentItem(list.first()); iv->scrollToItem(list.first(), QAbstractItemView::PositionAtCenter); }}