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

setCursor() stops working after interacting with a messagebox using the keyboard

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.8.2
    • Widgets: GraphicsView
    • None
    • macOS Sequoia 15.3.2
      Qt 6.8.2 (official build)
      Apple Clang 16.0.0
    • macOS

    Description

      Description:
      After opening a QMessageBox and interacting with it using the keyboard (e.g., pressing Space or Enter to confirm), setCursor() no longer updates the cursor properly. The issue is inconsistent but occurs frequently.

      Steps to Reproduce:

      1. Run the provided minimal example.
      1. Press Command + Drag to pan an image—this should correctly change the cursor to a hand icon.
      1. Right-click to open a QMessageBox and interact with it using Space or Enter.
      1. Try panning again—the cursor remains an arrow instead of changing to a hand.

      Expected Behavior:
      The cursor should update correctly after interacting with the QMessageBox, just as it does before opening it.

      Actual Behavior:
      After dismissing the QMessageBox with the keyboard, setCursor() no longer changes the cursor as expected.

      Additional Information:

      • A minimal example is attached.

      Attachments

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

        Activity

          People

            bibr Andreas Aardal Hanssen
            kevinhoang Kevin Hoang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes