29 lines
1.0 KiB
C++
29 lines
1.0 KiB
C++
#ifndef PROJECTMODELCOMBODELEGATE_H
|
|
#define PROJECTMODELCOMBODELEGATE_H
|
|
|
|
#include <QStyledItemDelegate>
|
|
|
|
class ProjectTableDelegate : public QStyledItemDelegate
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
ProjectTableDelegate(QObject *parent = nullptr);
|
|
~ProjectTableDelegate();
|
|
|
|
QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option,const QModelIndex& index) const override;
|
|
|
|
//bool eventFilter(QObject* obj, QEvent* event) override;
|
|
|
|
//void setEditorData(QWidget* editor, const QModelIndex& index) const override;
|
|
|
|
//void setModelData(QWidget* editor, QAbstractItemModel* model,const QModelIndex& index) const override;
|
|
|
|
bool editorEvent(QEvent* event, QAbstractItemModel* model,
|
|
const QStyleOptionViewItem& option, const QModelIndex& index) override;
|
|
void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override;
|
|
signals:
|
|
void editingFinished(const QModelIndex &index, const QString &value) const;
|
|
};
|
|
|
|
#endif // PROJECTMODELCOMBODELEGATE_H
|