Enabling QtTranslator for "qt_" disable OS X menubar integration partly

  • Hi,

    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));
    QTranslator myappTranslator;
    myappTranslator.load("qthamtools_" + QLocale::system().name());

    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 ?

  • Lifetime Qt Champion

    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 ?ä