[Interest] Disable automatic shortcuts for certain widgets?

Murphy, Sean smurphy at walbro.com
Tue Jun 9 17:39:59 CEST 2020


In our application, we have a QTabWidget. We allow the users to rename the tabs. One of our users discovered that if they put an '&' in the string, it isn't displayed, and if they put two together in sequence ("&&"), a single '&' is displayed on the tab widget.

I completely understand what's happening, the text they are entering is being evaluated by the native widgets for the presence of the '&' character to automatically create shortcuts as described here: https://doc.qt.io/qt-5/qabstractbutton.html#text-prop.

In other parts of our application, I do want the automatic shortcut functionality (i.e. having the &File for the File menu is something I'd like to keep), but for this specific tab widget I'd like to disable that functionality since our users aren't software developers and they find it weird that the ampersand character behaves differently than other characters in the string.

I don't see any way to disable that functionality though, is there one that I'm missing?

Sean




This message has been scanned for malware by Forcepoint. www.forcepoint.com


More information about the Interest mailing list