How to hide ampersand
In Qt when I ie name a label '&label' this means that letter 'l' will be underscored after I press 'Alt' button. And that works. Is there a way as to mak开发者_运维百科e this underscore dissapear after some action has been executed?
Just name it 'label' as the action is executed
You could derive your own class from QLabel where you save the original text including ampersands and have a method that removes the ampersand or uses the original text and calls QLabel::setText.
精彩评论