I'm trying to add a Progress bar as a busy indicator. However, it's behaving strange - the 'progress' only goes a quarter of the way up the bar and then restarts at the beginning. I'm using the following code:

test.cpp
Qt Code:
  1. test::test()
  2. {
  3. QProgressBar *qProBar = new QProgressBar;
  4. qProBar->setRange(0,0);
  5.  
  6. QVBoxLayout *mainLayout = new QVBoxLayout();
  7. mainLayout->addWidget(qProBar);
  8.  
  9. setLayout(mainLayout);
  10. }
To copy to clipboard, switch view to plain text mode 

test.h
Qt Code:
  1. class test : public QWidget
  2. {
  3. Q_OBJECT
  4.  
  5. public:
  6. test();
  7. ~test();
  8. };
To copy to clipboard, switch view to plain text mode 

I couldn't find any similar problems on the net, and the code is as minimal as it can get. Any ideas? Thanks in advance!