#ifndef EXTENDEDGROUPBOX_H #define EXTENDEDGROUPBOX_H #include #include class ExtendedGroupBox : public QGroupBox { Q_OBJECT public: enum State { STATE_NORMAL, STATE_EXPAND }; public: ExtendedGroupBox(QWidget *parent = nullptr, State state = STATE_NORMAL); ExtendedGroupBox(const QString &title, QWidget *parent = nullptr, State state = STATE_NORMAL); private Q_SLOTS: void onChecked(bool checked); public: void addWidget(QWidget *widget); State getState() const; private: State state_; }; #endif // EXTENDEDGROUPBOX_H