Что такое формат файла QM?
.qm files are associated with Qt Linguist, a translation software tool developed by The Qt Company (originally Trolltech).
Files with a .qm extension store source text and its compiled translation to a target language. .qm files store data in binary format for fast data access and lookup at runtime. They are used for distributing application translations into local languages across Windows, macOS, Linux, Android, iOS, and other Qt-supported platforms.
.qm is the compiled, runtime-loaded counterpart of the human-editable .TS (Translation Source) file. The workflow is: developers and translators work in the .ts XML file, then the lrelease command-line tool compiles it into a compact .qm binary that the application loads at startup via Qt's QTranslator class.
Qt Linguist allows users to create application translations and localizations. Because .qm is a compiled binary file and not a plain text file, it is not possible to read its contents directly - not even with Qt Linguist itself. The file begins with a fixed 16-byte magic number, followed by tagged data blocks (Hashes, Messages, Contexts, NumerusRules, Dependencies) that enable fast string lookup at runtime.
In order to open a .qm file with Qt Linguist, it is necessary to convert it back to .ts first. There are many tools that allow such conversion; most of them are command-line utilities, including lconvert (part of the Qt tools bundle). The resulting .ts file can be opened directly with Qt Linguist. .ts files are editable - a user can translate the text and then convert the file back to .qm using lrelease. This process allows users to generate and distribute language packages for applications.
Безопасность и защита
РИСК: LOWA .qm is passive translation data loaded by Qt's QTranslator and executes no code. It is safe. The only practical caution is editing the wrong file: changes must be made in the .ts source and recompiled, since hand-editing the binary .qm will corrupt it.
Детали формата
в двух словах- QuickTime metadata / misc - Occasionally seen for unrelated tool data; the dominant meaning is the Qt compiled translation.
Программы, открывающие файлы QM
Технические подробности
глубокая спецификация| Developer | The Qt Company (originally Trolltech / Nokia / Digia) |
| Format type | Compiled binary translation catalog |
| MIME type | application/x-qm (also application/octet-stream) |
| File signature (magic bytes) | 16-byte header at offset 0: 3C B8 64 18 CA EF 9C 95 CD 21 1C BF 60 A1 BD DD |
| Byte order | Big-endian |
| Internal structure | Tag/length/value blocks: Hashes, Messages, Contexts, NumerusRules, Dependencies |
| String encoding | UTF-16 or UTF-8 per string |
| Compression | None - strings stored as-is; plural (numerus) rules encoded compactly |
| Typical file size | 5 KB - 2 MB, depending on number of translated strings |
| Source format | .ts (Translation Source, XML) - the human-editable counterpart compiled by lrelease |
| Compilation tool | lrelease (Qt command-line tool, part of the Qt tools bundle) |
| Reverse conversion tool | lconvert (Qt command-line tool) - converts .qm back to .ts or other formats |
| Runtime loader | QTranslator class in the Qt framework |
| String lookup | O(1) via per-message hash table embedded in the file |
| Supported platforms | Windows, macOS, Linux, Android, iOS, embedded Qt targets |
| Выпущен | 1990s (Qt internationalization framework) |
| Последняя версия | Tied to the Qt release stream (Qt 6.x in 2026); QM binary layout stable |
| Открыть стандартное | Да · без роялти |
| Спецификация | doc.qt.io |
Конвертации QM
Вопросы и ответы сообщества
спрошено пользователямиВопросов пока нет - станьте первым, кто спросит о файлах QM.