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. [SOLVED]Deploy with .qm file
Qt 6.11 is out! See what's new in the release blog

[SOLVED]Deploy with .qm file

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.4k Views 2 Watching
  • 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.
  • Z Offline
    Z Offline
    Zondar
    wrote on last edited by Zondar
    #1

    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

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

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

      Hope it helps

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

      Z 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

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

        Hope it helps

        Z Offline
        Z Offline
        Zondar
        wrote on last edited by
        #3

        @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.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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.

          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

          • Login

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