| 28 | } |
| 29 | |
| 30 | QWidget *ComboBoxDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| 31 | { |
| 32 | Q_UNUSED(option) |
| 33 | Q_UNUSED(index) |
| 34 | |
| 35 | QComboBox *comboBox = new QComboBox(parent); |
| 36 | |
| 37 | for(const ComboBoxItem &item : comboBoxItems) { |
| 38 | comboBox->addItem(item.first, item.second); |
| 39 | } |
| 40 | |
| 41 | return comboBox; |
| 42 | } |
| 43 | |
| 44 | void ComboBoxDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const |
| 45 | { |
nothing calls this directly
no outgoing calls
no test coverage detected