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

Shortcuts for actions in context menu don't work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 4.7.4, 4.8.0, 5.3.2
    • None
    • Windows 7 x64 (Qt 4.8), Kubuntu 11.10 (Qt 4.7.4)

    Description

      When you set a keyboard shortcut for QAction and add it to a QMenu, then show that menu as a context menu of a widget, it will not be possible to trigger the action with the shortcut (only clicking with mouse or pressing navigation buttons like Enter will trigger it).

      I've attached a small test case. It was checked on Windows 7 x64, Qt 4.8 and Kubuntu 11.10, Qt 4.7.4.

      I tried to debug it on my own and saw that QMenu::keyPressEvent() seems to check only for mnemonics of the action, not its shortcut.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            fazer Arkadiusz Piekarz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes