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

API to prevent QMenuBar's actions to eat shortcuts

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Fixed
    • Not Evaluated
    • None
    • 6.3.0
    • GUI: Menus
    • None
    • Linux/X11

    Description

      On macOS, it's possible to create a QMenuBar without a parent that would be used as native menu bar for all the windows and won't interfere with window's shortcuts. On Linux, QMenuBar without parent doesn't work, though, so the only way to get a native-only menubar is to call QMenuBar::hide. But there's no way to disable shortcuts eating by those QAction what makes the QActions broken as they send a synthetic event with the same shortcuts. Creating QAction without shortcut specified is not a way as that would remove the shortcut suggestion from the menu bar. Currently I use QActionPrivate::setShortcutEnabled to get the needed behavior, would be nice to have a public API though.

      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
            ilya-fedin Ilya Fedin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes