| 55 | } |
| 56 | |
| 57 | void ToolItemDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const |
| 58 | { |
| 59 | auto edit = qobject_cast<DLineEdit *>(editor); |
| 60 | const auto &text = edit->text(); |
| 61 | if (!text.isEmpty()) |
| 62 | model->setData(index, text); |
| 63 | } |
| 64 | |
| 65 | void ToolItemDelegate::updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| 66 | { |