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. qt-test.zip
          2 kB
        2. testCtrlTabKeySequence.tar.gz
          2 kB
        3. testTabOrder.tar.gz
          2 kB
        4. qtbug8596.zip
          5 kB

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes