Important: Please read the Qt Code of Conduct -

[SOLVED]Deploy with .qm file

  • Hello,

    I want to build project and add .qm files into build directory. I managed to get working translation of my app, but I have to move these .qm files to build directory by myself. I tried to use add translations in .pro file under "TRANSLATIONS", but it does not work. Any idea?

    Thanks in advance

  • Lifetime Qt Champion


    You could use QMAKE_POST_LINK to copy the files to the right place.

    Hope it helps

  • @SGaist

    Will that work on Android as well? I am sorry for that I did not mentioned that I want to deploy on Android as well.

  • Lifetime Qt Champion

    Deployment itself is another beast and will depend on the platforms you target and the installer framework used. For a platform agnostic solution you could embed the translation files in your application using Qt's resource system.
    In the case of Android, you can also use their "assets" system to distribute them.

Log in to reply