#ifndef LOQTREEWIDGET_H #define LOQTREEWIDGET_H #include #include #include class LoQTreeWidget : public QTreeWidget { Q_OBJECT public: enum CheckState { CheckNone, CheckOne, CheckMulti }; public: explicit LoQTreeWidget(QWidget *parent = nullptr); public: void adjustCheckState(); QTreeWidgetItem* itemChecked(); QModelIndex indexFromItem(QTreeWidgetItem *item, int column = 0) const;//add by alahover 20200306 void HideHeaderCheckBox(bool b); signals: void sigCheckStateChanged(int); public slots: void onCheckAll(bool checked); void onItemClicked(QTreeWidgetItem *item, int column); private: LoQHeaderViewCheckBox *m_header; int m_checkState; }; #endif // LOQTREEWIDGET_H