Unity does not handle Qt menu item with shortcut and underscore correctly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Unity |
New
|
Undecided
|
Unassigned | ||
unity (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
If the item of a Qt menu has a text that contains both an ampersand (for the shortcut) and an underscore, the text is not displayed correctly in the Unity menubar.
Such texts occur frequently in recent file menus of applications if the file name is prepended by a number for the shortcut key and the file name contains an underscore. I tested it with a minimal Qt 5.3.0 project on Ubuntu 14.10 and the following code in the main window constructor:
MainWindow:
: QMainWindow(parent)
{
QMenu* menu = menuBar(
menu-
}
The text in the Unity menu does not show the ampersand or uses the intended shortcut Alt-I, but instead underlines and "t" and uses Alt-T for the shortcut.
The bug still exists in Ubuntu 15.10.