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

[REG: 5.4.2->5.5.0] Shortcuts do not work correctly, especially when SHIFT is utilized either as a modifier or implicitly

    XMLWordPrintable

    Details

    • Commits:
      4067bbc24cf7a6d3058387225d9e67ad093991cd

      Description

      Consider this small application:

      #include <QApplication>
      #include <QKeySequence>
      #include <QPushButton>
      
      int main(int argc, char *argv[])
      {
          QApplication app(argc, argv);
          QPushButton b("Press keys");
          b.setShortcut(QKeySequence(Qt::Key_7 | Qt::CTRL | Qt::SHIFT));
          QObject::connect(&b, &QPushButton::clicked, [](bool) { qApp->quit(); });
          b.show();
          return app.exec();
      }
      

      With Qt 5.4, the app exits when pressing Ctrl+Shift+7.
      With Qt 5.5, nothing happens. It does quit, however, if I change the shortcut to QKeySequence(Qt::Key_Slash | Qt::CTRL | Qt::SHIFT) (I'm using German keyboard layout).
      I don't think this is what users expect.

        Attachments

        1. qtbug47062.zip
          1 kB
          Friedemann Kleint

          Issue Links

          For Gerrit Dashboard: QTBUG-47062
          # Subject Branch Project Status CR V

            Activity

              People

              • Assignee:
                frederik Frederik Gladhorn
                Reporter:
                kandeler Christian Kandeler
              • Votes:
                7 Vote for this issue
                Watchers:
                15 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes