#ifndef LOQTREEWIDGET_H #define LOQTREEWIDGET_H #include #include class LoQTreeWidget : public QTreeWidget { Q_OBJECT public: enum CheckState { CheckNone, CheckOne, CheckMulti }; explicit LoQTreeWidget(QWidget *parent = nullptr); void adjustCheckState(); QModelIndex indexFromItem(const QTreeWidgetItem *item, int column = 0) const { return QTreeWidget::indexFromItem(item, column); }; QCheckBox *fdIsSelAll; signals: void sigCheckStateChanged(int); public slots: void onCheckAll(bool checked); private: QHeaderView *m_header; int m_checkState; }; #endif // LOQTREEWIDGET_H