| 45 | } |
| 46 | |
| 47 | void SpinBoxDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const |
| 48 | { |
| 49 | QSpinBox *spinBox = static_cast<QSpinBox*>(editor); |
| 50 | spinBox->interpretText(); |
| 51 | int value = spinBox->value(); |
| 52 | |
| 53 | model->setData(index, value, Qt::EditRole); |
| 54 | } |
| 55 | |
| 56 | void SpinBoxDelegate::updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| 57 | { |