C++ (Qt)#ifndef WIDGET_PROGRESS_BAR_H#define WIDGET_PROGRESS_BAR_H #include <QProgressDialog>#include <QProgressBar> class Dialog_progress_bar : public QProgressDialog{ Q_OBJECT private: QProgressBar* progressBar; public: Dialog_progress_bar(QWidget *parent = 0,Qt::WindowFlags f = 0 ); Dialog_progress_bar( const QString & labelText, const QString & cancelButtonText, int minimum, int maximum, QWidget * parent = 0, Qt::WindowFlags f = 0 ); ~Dialog_progress_bar(); public slots: void setFormat(const QString & format) { progressBar->setFormat(format); } void setTextVisible(bool vis) { progressBar->setTextVisible(vis); } void text() { progressBar->text(); } QProgressBar* progress_bar() const { return progressBar; } };