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

Qt Code:
  1. Form::Form(QWidget* parent): QMainWindow(parent)
  2. {
  3. progress = new QProgressBar(this);
  4. progress->setVisible(false);
  5.  
  6. statusbar->addPermanentWidget(progress);
  7. }
  8.  
  9. Form::showProgress(bool visible)
  10. {
  11. progress->setVisible(visible);
  12. }
To copy to clipboard, switch view to plain text mode 

Any ideas???

Thanks in advance!