kleinstein
kleinstein

Reputation: 33

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

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.

Upvotes: 3

Views: 616

Answers (1)

Xplatforms
Xplatforms

Reputation: 2232

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.

Upvotes: 5

Related Questions