QStatusBar and QProgressBar
Hi all.
I'm wish to add a QProgressBar to a QStatusBar in QMainWindow. But it must not be visible all the time.
I'm using a code similar to this and can't get it to work
Code:
{
progress->setVisible(false);
statusbar->addPermanentWidget(progress);
}
Form::showProgress(bool visible)
{
progress->setVisible(visible);
}
Any ideas???
Thanks in advance!
Re: QStatusBar and QProgressBar
You need to hide progress bar again, when your task is completed or when progress value reaches at highest range.
Re: QStatusBar and QProgressBar
Quote:
Originally Posted by
yogeshgokul
You need to hide progress bar again, when your task is completed or when progress value reaches at highest range.
Yup. I agree with @yogeshgokul. You have to hide it or disable it when your process is completed.
Re: QStatusBar and QProgressBar
status bar is having the option of removing and adding a QWidget ... u can use that one also ..
Re: QStatusBar and QProgressBar
Quote:
Originally Posted by
wagmare
status bar is having the option of removing and adding a QWidget ... u can use that one also ..
I think he is using same :)
Code:
statusbar->addPermanentWidget(progress);
Re: QStatusBar and QProgressBar
Hi all.
I solve the problem with the following code:
Code:
progress->setVisible(visible);
qApp->processEvents();
Thanks for the help!!!