Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-25316

QProgressDialog with minimum value set different from zero doesn't repaint

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.5.0 Alpha
    • 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;
          }
      }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            dfaure David Faure (Private)
            jonaias jonas dourado
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes