#ifndef VBOXLAYOUT_H #define VBOXLAYOUT_H #include class VBoxLayout : public QVBoxLayout { Q_OBJECT public: explicit VBoxLayout(QWidget *parent = nullptr); ~VBoxLayout(); void addWidgets(const QList &widgets, int stretch = 0, Qt::Alignment alignment = Qt::AlignTop); void addWidget(QWidget *widget, int stretch = 0, Qt::Alignment alignment = Qt::AlignTop); void removeWidget(QWidget *widget); void deleteWidget(QWidget *widget); void removeAllWidget(); void removeAllItems(); QList widgets() const; signals: private: QList m_widgets; }; #endif // VBOXLAYOUT_H