PDA

View Full Version : base questio on qprogredialog



mickey
27th July 2006, 13:20
hi I have 2 progress bar:


QProgressBar b1;
QProgressBar b2;
b1.setProgress (0, n);
b2.setProgress(0,n*2)
for (int i=0; i< n; i++) {
b1.setProgress(i);
b2.setProgress(i)
}
at the end I think b1 bar must be at its end! and b2 at its half. is it right? is it work so?
thanks.... (I need to do that)...

e8johan
29th July 2006, 17:29
Yes, but you will not see any updates while they are progressing as the event loop is not run within the for-loop. Perhaps you could try using a timer, or calling the event loop by using the appropriate method from QApplication.