Files
GUI/src/components/AccountRoleComboDelegate.h

25 lines
617 B
C
Raw Normal View History

2021-12-08 15:10:56 +08:00
//
// Created by Krad on 2021/12/8.
//
#ifndef GUI_ACCOUNTROLECOMBODELEGATE_H
#define GUI_ACCOUNTROLECOMBODELEGATE_H
#include <QAbstractItemModel>
#include <QItemDelegate>
class AccountRoleComboDelegate:public QItemDelegate {
Q_OBJECT
public:
explicit AccountRoleComboDelegate(QWidget *parent = nullptr);
2021-12-08 17:49:11 +08:00
protected:
void drawDisplay(QPainter *painter, const QStyleOptionViewItem &option,
const QRect &rect, const QString &text) const override ;
2021-12-08 15:10:56 +08:00
private:
QAbstractItemModel* model = nullptr;
QMap<QString,QVariant> map ;
};
#endif //GUI_ACCOUNTROLECOMBODELEGATE_H