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

Mac cocoa only: QKeyEvent Qt::Key_Tab not accessible to event or eventFilter

    XMLWordPrintable

Details

    Description

      The QKeyEvent Qt::Key_Tab is not accessible to event or eventFilter

      for example, I added my own widget event(QEvent*) method to trap keypress events and check for Key_Tab (exactly as defined in the events docs: http://doc.trolltech.com/4.6/eventsandfilters.html

      bool MyWidget::event(QEvent *event)
      {
      if (event->type() == QEvent::KeyPress) {
      QKeyEvent *ke = static_cast<QKeyEvent *>(event);
      if (ke->key() == Qt::Key_Tab)

      { // special tab handling here return true; }

      this does not work on my Mac 4.6.1 cocoa, but works as expected on mac 4.61 carbon and X11/Linux.

      Update:
      Qt::Key_Tab seems to be not working with Qt::Meta modifier (Ctrl)if we set a shortcut with QKeySequence(Qt::META + Qt::Key_Tab) then Ctrl+Tab will not trigger the action if it is using cocoa, It works perfectly fine on carbon.

      Attached example testCtrlTabKeySequence.tar reproduces this

      Attachments

        1. qtbug8596.zip
          5 kB
        2. qt-test.zip
          2 kB
        3. testCtrlTabKeySequence.tar.gz
          2 kB
        4. testTabOrder.tar.gz
          2 kB

        Issue Links

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

          Activity

            People

              vhilshei Volker Hilsheimer
              rcoreilly Randall O'Reilly
              Veli-Pekka Heinonen Veli-Pekka Heinonen
              Votes:
              16 Vote for this issue
              Watchers:
              20 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes