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

[REGRESSION] QApplication::keyboardModifiers() ignores Shift key modifier (Macintosh)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.3.0
    • 5.2.0
    • None
    • Macintosh 10.6.8, 10.9
    • 15ec9907f968f3c4ebe461617b448f5c8d05e5c5

    Description

      If you have code that calls QApplication::keyboardModifiers() or QApplication::queryKeyboardModifiers(), and the shift key is held down when either of these functions is called, the response will not indicate that the shift key is held down when it is in certain situations.

      So far, the only situation in which I have encountered this bug is when code is called as a result of an action in a menu bar being triggered. If the same code is called as a result of the action being triggered by a tool button press, I do not see the bug.

      To reproduce:
      1. Build and execute the attached test case.
      2. Hold the Shift key down and click the "Show Dialog" tool button. The label in the dialog will indicate that Shift was held down.
      3. Close the dialog.
      4. Hold the shift key down and click the "Main" menu item and click the "Show Dialog" action. The dialog will incorrectly indicate that Shift is not depressed.

      Using the attached test case, I can reproduce this in 5.2.0 but not in 4.8.5. Those are the only versions I've tried. I also don't see this bug using Windows 7.

      Attachments

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

        Activity

          People

            dedietri Gabriel de Dietrich (drgvond)
            aclight Adam Light
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes