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

Accepting a QEvent::ShortcutOverride still triggers shortcuts on Mac OS X.

XMLWordPrintable

    • macOS
    • 4b618e48c909fcc5665e9d60645023c48b2ffb43

      Using a Cocoa build of Qt:

      • Add some shortcuts to a QMainWindow's menu
      • Override event() method in a child widget of that window as such:
      bool MyWidget::event(QEvent *event)
      {
          if (event->type() == QEvent::ShortcutOverride)
              event->accept();
      
          return QWidget::event(event);
      }

      Works as expected on Windows (main window shortcuts won't be triggered), but seems to do nothing whatsoever on OS X.

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

            pullatti Prasanth Ullattil
            antipro Karel Bassez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes