MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / setEditorData

Method setEditorData

launcher/ui/instanceview/InstanceDelegate.cpp:412–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

410}
411
412void ListViewDelegate::setEditorData(QWidget* editor, const QModelIndex& index) const
413{
414 auto text = index.data(Qt::EditRole).toString();
415 QTextEdit * realeditor = qobject_cast<NoReturnTextEdit *>(editor);
416 realeditor->setAlignment(Qt::AlignHCenter | Qt::AlignTop);
417 realeditor->append(text);
418 realeditor->selectAll();
419 realeditor->document()->clearUndoRedoStacks();
420}
421
422void ListViewDelegate::setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const
423{

Callers

nothing calls this directly

Calls 3

appendMethod · 0.80
toStringMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected