MCPcopy Create free account
hub / github.com/dail8859/NotepadNext / createEditor

Method createEditor

src/ComboBoxDelegate.cpp:30–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30QWidget *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
44void ComboBoxDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const
45{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected