Find a place in your MainWindow widget, where you want to stick your QProgressIndicator widget or just bring it up as a modal dialog.
QProgrssIndicator* piObj = new QProgressIndicator(this);
piObj->setAnimationDelay(40);
piObj->setDisplayedWhenStopped(false);
piObj
->setColor
(QColor(Qt
::Red));
connect(startButton, SIGNAL(clicked()), piObj, SLOT(startAnimation());
connect(stopButton, SIGNAL(clicked()), piObj, SLOT(stopAnimation());
QProgrssIndicator* piObj = new QProgressIndicator(this);
piObj->setAnimationDelay(40);
piObj->setDisplayedWhenStopped(false);
piObj->setColor(QColor(Qt::Red));
connect(startButton, SIGNAL(clicked()), piObj, SLOT(startAnimation());
connect(stopButton, SIGNAL(clicked()), piObj, SLOT(stopAnimation());
To copy to clipboard, switch view to plain text mode
Bookmarks