#ifndef _PROGRESS_H_ #define _PROGRESS_H_ #include class QProgressBar; class QResizeEvent; class QLabel; class Progress : public QWidget { Q_OBJECT public: explicit Progress(QString text, QWidget *parent = nullptr); ~Progress(); void setProgress(int percent); void setCaption(const QString& caption); protected: virtual void resizeEvent(QResizeEvent *event) override; private: QLabel *_label; QProgressBar *_progress; bool _hidden; }; #endif