| 180 | } |
| 181 | |
| 182 | void ExamplesWidget::activateIconViewItem(const QString& name) { |
| 183 | auto* model = ui.lvExamples->model(); |
| 184 | for (int i = 0; i < model->rowCount(); ++i) { |
| 185 | const auto& index = model->index(i, 0); |
| 186 | if (index.data(Qt::DisplayRole).toString() == name) { |
| 187 | ui.lvExamples->setCurrentIndex(index); |
| 188 | ui.lvExamples->scrollTo(index); |
| 189 | } |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | void ExamplesWidget::activateListViewItem(const QString& name) { |
| 194 | const auto& items = ui.lwExamples->findItems(name, Qt::MatchExactly); |