marc2050
13th May 2011, 02:25
Hi.
I've a long calculation that takes time.
I tried using progressdialog to show users the status of the calculation.
But the progressdialog apear on screen. after than it just doesnt update
until the entire calculation finishes. Here's my codes. What could be wrong?
QProgressDialog pd;
pd.setRange(0,100000);
pd.setLabelText("Long calculations...");
pd.setValue(0);
pd.show();
In the calculation function, I've
pd.setValue(somevalue) where somevalue is the value I obtained.
pd.show()
On the screen, what i see is just a progress dialog, which does not even have the bar moving at all. It sort of like those you see when something doesnt complete and freeze. And when all is done, the dialog just closes.
What is really happening? Any advise?
Thanks.
I've a long calculation that takes time.
I tried using progressdialog to show users the status of the calculation.
But the progressdialog apear on screen. after than it just doesnt update
until the entire calculation finishes. Here's my codes. What could be wrong?
QProgressDialog pd;
pd.setRange(0,100000);
pd.setLabelText("Long calculations...");
pd.setValue(0);
pd.show();
In the calculation function, I've
pd.setValue(somevalue) where somevalue is the value I obtained.
pd.show()
On the screen, what i see is just a progress dialog, which does not even have the bar moving at all. It sort of like those you see when something doesnt complete and freeze. And when all is done, the dialog just closes.
What is really happening? Any advise?
Thanks.