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

Override cursor doesn't restore properly if QGuiApplication::restoreOverrideCursor() is called on top of widget that has a custom cursor defined.

    XMLWordPrintable

Details

    • 8547205fe882819af9eb4cdd024404ab3b9ad0dc

    Description

      The attached application can be used to demonstrate the issue. Both buttons have custom cursors defined. Upper button sets override cursor and lower button restores the most recently set override cursor. Once the last override cursor is restored, the cursor should change to the custom cursor of the lower button, but it will instead be the default cursor.

      This happens because QtGui doesn't have dependency to QtWidgets, so QGuiApplication can't check if widget wants non-default cursor restored. A possible solution is to make QWindow have a custom cursor similarly to QWidget, and make QGuiApplication check and use that. Most of the generic cursor logic currently in QtWidgets could then probably be moved to QtGui side and benefit non-widgets applications as well.

      Attachments

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

        Activity

          People

            e0348803 Miikka Heikkinen
            e0348803 Miikka Heikkinen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes