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

QProgressDialog messes-up the setOverrideCursor

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Fixed
    • Affects Version/s: 5.10.0, 5.11, 5.12.0
    • Fix Version/s: 5.13.0 Alpha 1
    • Labels:
      None
    • Environment:
      MSVC 2017 64 bit used on Windows 10
    • Platform/s:
      All
    • Commits:
      3456d516504c70226934826393284b1eb6d9c35d

      Description

      When setting the override cursor and using a QProgressDialog instance to perform dome action before resetting the override cursor, the QProgressDialog seems to reset the cursor shown to the normal arrow cursor and restoring the override cursor then sometimes fails. Result is that the wait cursor remains being shown.

      In the QProgressDialog code, in the reset function there is a part at line 600 that might cause this

       

      #ifndef QT_NO_CURSOR
          if (value() >= 0) {
              if (parentWidget())
                  parentWidget()->setCursor(d->parentCursor);
          }
      #endif
      

      In here the private member parentCursor is being used but as far as I can see, this member is never being set. If this gets initialized with 0, it will reset the used cursor to the arrow cursor.

       

      I now have to reset the override cursor before using the QProgressDialog and set it again after resetting it

       

        Attachments

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

          Activity

            People

            Assignee:
            chehrlic Christian Ehrlicher
            Reporter:
            eelcopeacs Eelco van Dam
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes