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

Wrong cursor showing when restoreOverrideCursor in QDockWidget

    XMLWordPrintable

Details

    • Windows
    • 0c9e82231de7280a9aa2a2e30debe78e49f99b09 (qt/qtbase/6.2) 9ad00e4b3f4d71f31ba041af623741522a221ffc (qt/qtbase/dev) b2e810da53f6feffaf8282cae720530a13b54c04 (qt/tqtc-qtbase/5.15)

    Description

      The wrong cursor shape is showing when cursor moves from a widget showing one cursor shape, through an area that sets an override cursor, into a floating QDockWidget that sets a different cursor, after which the override cursor is cleared.

      We suspect this also occurs with other toplevel windows, not just floating QDockWidgets, however that is how we identified the issue.

      See attached minimal example that illustrates the issue, as well as the screen recording of the app (tiny cursor appears to be an artifact of the screen recorder):

      In this screen recording, the QDockWidget has it's cursor set to Qt::CrossCursor, and the cross should be showing when the cursor is in the middle of the QDockWidget, however it shows instead the last non-override cursor that was shown (in this case, the Qt::IBeamCursor). The app in this screen recording was built with Qt 6.2.0.

      Additionally, any further attempts to set the cursor to the same cursor (Qt::CrossCursor) in the QDockWindow are ignored and do not function.

      Workaround: Set the cursor to some other cursor, then back to Qt::CrossCursor in this scenario.

      Attachments

        1. 7QVpdYd0Rf.gif
          7QVpdYd0Rf.gif
          321 kB
        2. QTBUG-98856-qt-cursor-override-test.7z
          31 kB
        3. qtbug98856.zip
          5 kB
        4. qtbug98856_log.txt
          5 kB
        5. qtbug98856_diag515.diff
          9 kB

        Issue Links

          Activity

            People

              kleint Friedemann Kleint
              kkyzivat Keith Kyzivat
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: