24 lines
585 B
C
24 lines
585 B
C
|
|
//
|
||
|
|
// 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);
|
||
|
|
void paint(QPainter *painter,
|
||
|
|
const QStyleOptionViewItem &option,
|
||
|
|
const QModelIndex &index) const override;
|
||
|
|
private:
|
||
|
|
QAbstractItemModel* model = nullptr;
|
||
|
|
QMap<QString,QVariant> map ;
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif //GUI_ACCOUNTROLECOMBODELEGATE_H
|