Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Precompile .qm file
Qt 6.12 LTS is out! See what's new in the release blog

Precompile .qm file

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 513 Views 1 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.
  • M Offline
    M Offline
    Mihaill
    wrote on last edited by
    #1

    Hi!
    I have .ts file.
    How I can precompile .qm file before compiling project?

    kkoehneK 1 Reply Last reply
    0
    • M Mihaill

      Hi!
      I have .ts file.
      How I can precompile .qm file before compiling project?

      kkoehneK Offline
      kkoehneK Offline
      kkoehne
      Moderators
      wrote on last edited by
      #2

      @Mihaill , you call lrelease. If you use qmake or CMake, this is supported nicely through an API (see also https://doc.qt.io/qt-6/linguist-lrelease.html)

      Director R&D, The Qt Company

      M 1 Reply Last reply
      0
      • kkoehneK kkoehne

        @Mihaill , you call lrelease. If you use qmake or CMake, this is supported nicely through an API (see also https://doc.qt.io/qt-6/linguist-lrelease.html)

        M Offline
        M Offline
        Mihaill
        wrote on last edited by Mihaill
        #3

        @kkoehne I add in .pro:

        TRANSLATIONS += QtLanguage_ru.ts
        lrelease.exe QtLanguage_ru.ts
        

        But i get error: Extra characters after test expression.

        And I use qt 5.15

        M 1 Reply Last reply
        0
        • M Mihaill

          @kkoehne I add in .pro:

          TRANSLATIONS += QtLanguage_ru.ts
          lrelease.exe QtLanguage_ru.ts
          

          But i get error: Extra characters after test expression.

          And I use qt 5.15

          M Offline
          M Offline
          Mihaill
          wrote on last edited by
          #4

          it's help me

          system(lrelease QtLanguage_ru.ts)
          
          1 Reply Last reply
          0
          • M Mihaill has marked this topic as solved on

          • Login

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