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

Method setEditorData

src/ColorPickerDelegate.cpp:39–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39void ColorPickerDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const
40{
41 QColorDialog *colorDialog = static_cast<QColorDialog*>(editor);
42 const QColor color = index.model()->data(index, Qt::DecorationRole).value<QColor>();
43
44 colorDialog->setCurrentColor(color);
45}
46
47void ColorPickerDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
48{

Callers

nothing calls this directly

Calls 1

dataMethod · 0.45

Tested by

no test coverage detected