Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
4.8.1
-
None
-
Windows XP. MSVC compiler 2010.
-
3c6f3336343735b266ec7291c077efd0e3ba0ea5
Description
I'm developing a program with a library that requires indexes starting from 1. The QTimer is not started unless a setValue() is called with value 0 which is below the current minimum value. The following if comparison would be nice to changed to the QProgressBar's minimum value.
The documentation would also be updated to tell the user to call a first setValue() to the minimum value instead of 0.
QProgressDialog.cpp::682
if (progress == 0) { d->starttime.start(); d->forceTimer->start(d->showTime); return; } else {
The code where the problem occurs.
QProgressDialog progressDialog("Calculating difference..", "Cancel", 1, vertices.Extent(), this); progressDialog.setWindowModality(Qt::WindowModal); progressDialog.setValue(0); for(int i=1;i<vertices.Extent();i++){ objectGroup->Connect(showDifferenceBetweenShapeAndPoint(rootShape, vertices(i),maxErrorSizeInMM)); progressDialog.setValue(i); if (progressDialog.wasCanceled()){ break; } }