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

QShortcut does not work on macOS if the keyboard layout is Korean when the application starts.

    XMLWordPrintable

Details

    • macOS

    Description

      QShortcut does not work on macOS if the keyboard layout is Korean when the application starts

      – Application started when the keyboard layout is Korean
      1. Change the keyboard layout to Korean
      2. Run application
      3. QShortcut does not work ***
      4. Change the keyboard layout to English
      5. QShortcut still does not work ***

      — Application started when the keyboard layout is English
      1. Change the keyboard layout to English
      2. Run application
      3. QShortcut works
      4. Change the keyboard layout to Korean
      5. QShortcut works

      Example:

      #include <QApplication>
      #include <QLabel>
      #include <QShortcut>
      
      static int i = 0;
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
      
          QLabel *label = new QLabel( "Click Here" );
          label->setMinimumSize( 300, 200 );
          label->setAlignment( Qt::AlignCenter );
          QShortcut *shortcut = new QShortcut( Qt::CTRL + Qt::Key_T, label );
          QObject::connect(shortcut, &QShortcut::activated, [=] {
              label->setText( QString( "Clicked: %1" ).arg( i++ ) );
          });
      
          label->show();
      
          return a.exec();
      }
      

      Attachments

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

        Activity

          People

            vestbo Tor Arne Vestbø
            shoon shoon
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes