#pragma once #include class QCheckBox; class CheckHeadView : public QHeaderView { Q_OBJECT public: CheckHeadView(QVector rCheckID,Qt::Orientation orientation, QWidget* parent = nullptr); ~CheckHeadView(); QCheckBox* GetCheckBox(int nCol); signals: void SignalStatus(int nCol, bool bStatus); protected: void paintSection(QPainter* painter, const QRect& rect, int logicalIndex) const; private slots: void OnChecked(); private: QVector m_rCheckIDs; QMap m_rCheckBoxMap; };