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

API to prevent QMenuBar's actions to eat shortcuts

XMLWordPrintable

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

      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.

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

            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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes