[Qt-interest] Stopping QAction from parsing "&"

Nikos Chantziaras realnc at arcor.de
Thu Jun 10 21:52:11 CEST 2010


I have a QMenu where I add QActions using the

   QMenu::addAction(const QString& text)

function.  Problem is, 'text' contains filenames (you guessed it; it's 
for a "Recent Files" menu), and some of the filenames contain "&" 
characters.  This gets parsed and generates a shortcut.  That's wrong, 
of course.  How do I prevent this from happening?



More information about the Qt-interest-old mailing list