开发者

How to hide ampersand

开发者 https://www.devze.com 2023-03-20 06:17 出处:网络
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 diss

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消