DataTableItemDelegate.h 741 B

123456789101112131415161718192021
  1. #ifndef DATATABLEITEMDELEGATE_H
  2. #define DATATABLEITEMDELEGATE_H
  3. #include <QStyledItemDelegate>
  4. class DataTableComboDelegate : public QStyledItemDelegate
  5. {
  6. public:
  7. explicit DataTableComboDelegate(QObject *parent = nullptr);
  8. QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
  9. void setEditorData(QWidget *editor, const QModelIndex &index) const override;
  10. void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
  11. void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option,
  12. const QModelIndex &index) const override;
  13. };
  14. #endif // DATATABLEITEMDELEGATE_H