/**
     *\brief 用来实现QTableWidget中整行hover的效果
     *
     *\author dsc
     */

#ifndef TABLEWIDGETHOVERDELEGATE_H
#define TABLEWIDGETHOVERDELEGATE_H

#include <QStyledItemDelegate>
#include <QTableWidget>

class QTableWidgetHoverDelegate : public QStyledItemDelegate
{
    Q_OBJECT

public:
    explicit QTableWidgetHoverDelegate(QTableWidget* parent = nullptr);
    ~QTableWidgetHoverDelegate();

protected:
    void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override;

private:
    QTableWidget* m_tableWiget;
};

#endif // TABLEWIDGETHOVERDELEGATE_H
