How to insert a special character into QMenu as a part of Title text?

Viewed 394

I want to insert a special character '&' into a QMenu as a part of Titletext on windows with QT.

How can i do it?

If I put this character into a QMenu as Titletext through QMenu::setTitle() function, then I can not see the special character.

The special character is just missing there.

I know that this special character '&' is normaly used for setting shortcut.

But i need to insert this character into QMenu as a part of Titletext.

1 Answers

I don't know why it is not described in QMenu documentation, but it is mentioned in QMenuBar detailed description:

You can use "&&" to get a real ampersand in the menu bar.

Related