you should call the progress bar in your fn() function.
Show your fn() fucntion code.
you should call the progress bar in your fn() function.
Show your fn() fucntion code.
It is a big code which is used to collect the system informations.
I called the progress bar in fn() like this
Qt Code:
fn() { fn1(); prgressBar.show(); fn2(); progressBar.show(); }To copy to clipboard, switch view to plain text mode
But it doesnt helps me
Thanks,
*npc*
but where do you call setValue()?
Because I want to show busy indicator in progress bar, I set minimum and maximum values as 0.
So what is the need of calling setvalue ? ..if it necessary what value have to send ?
Thanks,
*npc*
Well lets see -
How can the progress bar know, when to progress the bar?
I suggest you read the docs first:
http://doc.trolltech.com/4.2/qprogressbar.html
I think you're missing some QCoreApplication::processEvents() calls...
npc (31st March 2007)
Wysota - I think so too, but even that wont help if he doesen't call setValue()...![]()
Exactly.. Thanks Wysota.I think you're missing some QCoreApplication:rocessEvents() calls...
Now its working fine for me.. I called QCoreApplication:rocessEvents() in sub functions.
But I never called setValue() anywhere![]()
So how is the progress bar incremented?
The progress bar uses the concept of steps. You set it up by specifying the minimum and maximum possible step values, and it will display the percentage of steps that have been completed when you later give it the current step value. The percentage is calculated by dividing the progress (value() - minimum()) divided by maximum() - minimum().
It's not, it's just spinning all the time like in Star Trek or Knightrider. This is a special case of using a progress bar that is activated by setting the range of values to [0,0].
Oh I see - it didn't sink in that he used [0,0].
Sorry about that.![]()
how to make QProgress bar busy works
my code
Qt Code:
ui.initStatus->setRange(0,0); qApp->processEvents ( );To copy to clipboard, switch view to plain text mode
but, nothing happens.
thanks!
Last edited by jpn; 4th December 2008 at 17:59. Reason: missing [code] tags
Bookmarks