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

Method setEditorData

src/ComboBoxDelegate.cpp:44–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44void ComboBoxDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const
45{
46 QVariant value = index.model()->data(index, Qt::EditRole);
47 QComboBox *comboBox = static_cast<QComboBox*>(editor);
48
49 comboBox->setCurrentIndex(comboBox->findData(value));
50}
51
52void ComboBoxDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
53{

Callers

nothing calls this directly

Calls 1

dataMethod · 0.45

Tested by

no test coverage detected