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

[Regression Qt4 to Qt5] QScrollBar usages 5% CPU on idle

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Not Evaluated
    • 5.0.0 Beta 2
    • 5.0.0 Beta 1
    • None
    • Mac OS X 10.7, Clang

    Description

      Creating a QScrollBar will eat 5% of the CPU when the application is doing absolutely nothing. 0% CPU usage is expected when the application is doing nothing.

      The following code will reproduce the issue. The code works as expected in Qt 4.8.1.

      #include <QApplication>
      #include <QScrollBar>
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
      
          QScrollBar* scrollbar = new QScrollBar();
          scrollbar->show();
      
          return a.exec();
      }
      

      If you install an event filter (installEventFilter()) on a QScrollBar, it'll produce a never ending stream of paint events.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            vpicaver Philip Schuchardt
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes