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

QWidget::SetCursor does not change cursor immediately on Windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P5: Not important
    • None
    • 4.7.0, 4.7.3
    • None
    • Windows 7, Microsoft Visual Studio 2008 SP1 compiler, 32-bit based program.
      Windows XP

    Description

      We are using QT 4.7.0 libraries for a desktop application. One of our requirements is to momentarily set different cursor shapes for different widget while the application is processing a particular piece of code. Hence, we use QWidget::setCursor() to set the cursors on the widgets. Though the code works fine as expected when run on Linux platform, the behaviors is broken on Windows platform. We observe that on Windows platform the visuals for the cursors shapes don't get updated immediately; and the cursor is updated only after a while. During that period it shows a single cursor shape for all the widgets irrespective of different cursors set for different widgets.

      This problem would happen as following:-

      1 Set of panel (widget) are up
      2 In for loop set all widgets cursor to different value
      3 Perform lengthy task
      4 Restore normal cursor for different-2 value

      Here even after performing step#2, I do not see its effect for some time while step#3 is being performed. I expect that cursor is set correctly immediately after completing step#2.

      I have developed a sample program to demonstrate this behavior. Please check the source code attached. Please follow the instructions in the README.

      Attachments

        1. src.tar.gz
          2 kB
          Vipin Jain
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            jain_vipin_swm Vipin Jain
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes