Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
6.6
-
None
Description
There is issue with QToolTip and displayed text using translate. Double ampersand will not transformed to single ampersand.
I do not know about versions and platforms involved, I tested it on macOS, Qt 6.6.2
An example to reproduce, with QToolBar:
#include <QApplication> #include <QWidget> #include <QGridLayout> #include <QToolBar> #include <QAction> int main(int argc, char *argv[]) { QApplication *app = new QApplication(argc, argv); QWidget *widget = new QWidget; widget->setWindowTitle("QToolTip translate ampersand test"); widget->setMinimumSize(640, 480); QGridLayout *frm = new QGridLayout(widget); QToolBar *tbar = new QToolBar(); QAction *action = tbar->addAction(""); // ok double ampersand transformed action->setText(QCoreApplication::translate("main", "Double&&ersand")); // the issue double ampersand in tooltip displayed text action->setToolTip(QCoreApplication::translate("main", "Double&&ersand")); frm->addWidget(tbar); widget->setLayout(frm); widget->show(); return app->exec(); }