10#include <QApplication>
18 : QStyledItemDelegate { parent }
25 const auto edit =
new QLineEdit { parent };
27 edit->setFrame (
false);
35 initStyleOption (&opt, index);
36 opt.text = ITM_.Join (index.data ().toStringList ());
38 const auto style = opt.widget ? opt.widget->style () : QApplication::style ();
39 style->drawControl (QStyle::CE_ItemViewItem, &opt, painter);
44 const auto& tags = index.data (Qt::EditRole).toStringList ();
45 qobject_cast<QLineEdit*> (editor)->setText (ITM_.Join (tags));
50 const auto& tags = ITM_.Split (qobject_cast<QLineEdit*> (editor)->text ());
51 model->setData (index, tags, Qt::EditRole);