Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Enabling QtTranslator for "qt_" disable OS X menubar integration partly
Dashie last edited by
I've a basic graphic app, created with Qt Creator.
My menu is working correctly without translation on OS X: About and Exit get put under the "My App" menu, merged as expected.
But if i activate the translator, they are not merged anymore and they are put on my "File" menu, where i've put in fact.
My added code for translator is:
QTranslator qtTranslator; qtTranslator.load(QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); //a.installTranslator(&qtTranslator); QTranslator myappTranslator; myappTranslator.load("qthamtools_" + QLocale::system().name()); a.installTranslator(&myappTranslator);
The second one causes no problem, the first installTranslator, if uncommented it causes the problem.
I've qDebug()'ed the two things in the first .load and got (QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath)):
And inside the second i have only a "qt_fr.qm".
Any ideas on how to resolve that issue ?
Hi and welcome to devnet,
Do you mean that if you use the qt_fr.qm file everything is going well but if you add your own translation it starts acting up ?ä