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

OSX: QAction in QMenuBar needs double escaping of '&' to be shown properly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3: Somewhat important P3: Somewhat important
    • 5.15
    • 5.0.1
    • None
    • Qt 5.0.1, OSX 10.8.2
    • macOS

      In order to make menu action with text "foo & bar" you need to escape '&' like this action->setText("foo && bar");

      On mac if action is places to QMenuBar (http://qt-project.org/doc/qt-5.0/qtwidgets/qmenubar.html#qmenubar-on-mac-os-x), '&' is not shown in system-wide menu, and needs to be double-escaped like:
      action->setText("foo &&&& bar");

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

            richard Richard Moe Gustavsen
            sergei.nevdakh Sergei Nevdakh
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes