| 193 | } |
| 194 | |
| 195 | void IconComboBox::initConnections() |
| 196 | { |
| 197 | connect(iconView->selectionModel(), &QItemSelectionModel::selectionChanged, this, |
| 198 | [this](const QItemSelection &selected, const QItemSelection &deselected) { |
| 199 | QModelIndexList selectedIndexes = selected.indexes(); |
| 200 | if (!selectedIndexes.isEmpty()) { |
| 201 | auto icon = iconModel.data(selectedIndexes.first()).toString(); |
| 202 | if (!icon.isEmpty()) |
| 203 | iconName = icon; |
| 204 | } |
| 205 | |
| 206 | if (iconFrame->isVisible()) |
| 207 | iconFrame->hide(); |
| 208 | }); |
| 209 | } |
| 210 | |
| 211 | void IconComboBox::showPopup() |
| 212 | { |