#ifndef COMBODELEGATE_H #define COMBODELEGATE_H #include class ComboDelegate : public QItemDelegate { Q_OBJECT public: explicit ComboDelegate(QObject *parent = 0); QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem, const QModelIndex) const; void setEditorData(QWidget *editor, const QModelIndex &index) const; protected: virtual bool eventFilter(QObject, QEvent *event); }; #endif // COMBODELEGATE_H