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

QProgressBar not repainted in case minimum or maximum value changed

    XMLWordPrintable

Details

    • b1998f4f59c3b10700963b2d13a17a0cc77ef665

    Description

      The implementation of QProgressBar::setMinimum and QProgressBar::setMaximum do not call repaint for the widget. This causes the widget to be shown incorrectly at least in the following case:

          QProgressBar *pb1 = new QProgressBar();
          pb1->setMinimum(0);
          pb1->setValue(2);
          // similar outcome with QWindowsXPStyle (for QWindowsVistaStyle the use case works fine,
          // because a repaint is triggered with an animation timer used in QWindowsVistaStyle implementation)
          pb1->setStyle(new QWindowsStyle());
      
          ...
          pb1->setMaximum(10);
          // --> the widget is now showning "2% complete" even though it should be showing "20%"
          // If the user resizes the widget, it is repainted to show the correct state
      

      Note: This bug report has a dependency to QTBUGS-10501, because also the use cases of switching the progress bar type from undeterminate (minimum and maximum to 0) state to determinate state or vice-versa will be affected when merge request https://qt.gitorious.org/qt/qt/merge_requests/1427 will be integrated.

      Attachments

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

        Activity

          People

            kleint Friedemann Kleint
            teahola Tero Ahola (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes