I have buttons with & and when I do button->text()
, it return with '&' because it has a shortcut, we have buttons sometimes with more than 2 &.
This is for automated remote testing. The people who are writing the tests are not programmers and do not know the object names.
How QT deals when showing the labels on the button without the extras ampersand?
A possible solution? :
qAbstractButton->text().replace(QRegExp("SomeRegex"), "");