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

Method setModelData

src/ColorPickerDelegate.cpp:47–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void ColorPickerDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
48{
49 QColorDialog *colorDialog = static_cast<QColorDialog*>(editor);
50 QColor color = colorDialog->selectedColor();
51
52 if (color.isValid()) {
53 model->setData(index, color, Qt::EditRole);
54 }
55}

Callers

nothing calls this directly

Calls 1

setDataMethod · 0.45

Tested by

no test coverage detected