Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Enabling QtTranslator for "qt_" disable OS X menubar integration partly

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

Scheduled Pinned Locked Moved Unsolved General and Desktop
translationsosxmenubar
2 Posts 2 Posters 1.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dashie
    wrote on 26 Oct 2015, 12:23 last edited by
    #1

    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));
    //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)):

    "qt_fr_FR"
    "/Volumes/USB_128G/Dev/Qt/5.5/clang_64/translations"
    

    And inside the second i have only a "qt_fr.qm".

    Any ideas on how to resolve that issue ?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 26 Oct 2015, 22:57 last edited by
      #2

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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      2/2

      26 Oct 2015, 22:57

      • Login

      • Login or register to search.
      2 out of 2
      • First post
        2/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved