QProgress bar - Busy Indicator - Strange behaviour
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
Code:
test::test()
{
qProBar->setRange(0,0);
mainLayout->addWidget(qProBar);
setLayout(mainLayout);
}
test.h
Code:
{
Q_OBJECT
public:
test();
~test();
};
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!
Re: QProgress bar - Busy Indicator - Strange behaviour
What's the point of setting the bar's range to 0 ? :confused:.
Re: QProgress bar - Busy Indicator - Strange behaviour
http://doc.trolltech.com/latest/qpro...r.html#details
"If minimum and maximum both are set to 0, the bar shows a busy indicator instead of a percentage of steps. This is useful, for example, when using QFtp or QNetworkAccessManager to download items when they are unable to determine the size of the item being downloaded."
Re: QProgress bar - Busy Indicator - Strange behaviour
Ah , now i see. Works fine for me though...indicator runs the whole path repeatedly. Do you have any problems with displaying other widgets or it only happens with QStatusBar?
Re: QProgress bar - Busy Indicator - Strange behaviour
Strange. I'm using Visual Studio 2010. I tried running my app under Release rather than Debug and the progress bar works as expected.
Thanks anyway.