#ifndef __CUSTOM_LIST_VIEW_H__
#define __CUSTOM_LIST_VIEW_H__

#include <QTreeView>
#include <QStyledItemDelegate>

class ListItemDelegate: public QStyledItemDelegate
{
public:
    using QStyledItemDelegate::QStyledItemDelegate;
    QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override
    {
        QSize s = QStyledItemDelegate::sizeHint(option, index);
        s.setHeight(36);
        return s;
    }
};

class CustomListView : public QTreeView
{
    Q_OBJECT
public:
    CustomListView(QWidget *parent = nullptr);
    ~CustomListView();

    void setModel(QAbstractItemModel *model) override;

};
#endif // __CUSTOM_LIST_VIEW_H__