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

QAction doesn't work with cyrillic keyboard layout

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P1: Critical P1: Critical
    • 6.7.0 FF
    • 5.12.11, 5.15.2
    • QPA
    • None
    • macOS: Catalina 10.15.7

      Following example doesn't print "WORK" when cyrillic keyboard layout is used

      
      #include <QApplication>
      
      #include <QAction>
      #include <QDebug>
      
      int main(int argc, char *argv[])
      {
       QApplication a(argc, argv);
       QWidget w;
      
      QAction* langAction = new QAction(&w);
       langAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_N));
       w.addAction(langAction);
       QObject::connect(langAction, &QAction::triggered, [](){ qDebug() << "WORK"; });
      
      w.show();
       return a.exec();
      }
      
      

      Steps to reproduce:
      1) Ensure that "US" and "Russian - PC" is part of OS X's "Input Sources" by going to "System Preferences" and adding them under the "Input Sources" tab in the "Keyboard" preference. Also ensure that "Show input menu in menu bar" is enabled so you can quickly switch between the input sources.

      2) Compile and run the code above

      3) Switch to "Russian - PC" layout

      4) Press cmd+n

      Actual: nothing happens
      Expected: message "WORK" in the program output

      This bug is basically a duplicate of https://bugreports.qt.io/browse/QTBUG-50865 which is also can be reproduced despite being closed

      This bug is basically a duplicate of https://bugreports.qt.io/browse/QTBUG-52591 which is also can be reproduced despite being closed

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

            vestbo Tor Arne Vestbø
            yrhetatejlb yrhetatejlb
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes