translator files platform dependent?
Unsolved
Qt for Python
-
Hi
I put the translator file
qtbase_de.qm
in a resource file to embed it into my code.Loading the file on Linux is working fine. But same code on Windows fails.
Code:
qtTranslator = QTranslator() qDebug("Translator " + "exists" if QFile.exists(":/assets/qtbase_de.qm") else "exists not") if qtTranslator.load(":/assets/qtbase_de.qm"): qDebug(f"Translator installed: {qtTranslator.language()}") else: qDebug("no Translator installed")
Linux:
2024-11-21 13:53:53.627 [debug] JHXManager.unknown : Translator exists 2024-11-21 13:53:53.628 [debug] JHXManager.unknown : Translator installed: de_DE
Windows:
2024-11-21 13:54:35.146 [debug] JHXManager.unknown : Translator exists 2024-11-21 13:54:35.146 [debug] JHXManager.unknown : no Translator installed
In both cases, Linux and Windows, the file can be loaded from rc file, but why fails
qtTranslator.load
on Windows?I made a diff of the file from PySide6 on Linux and on Windows. The files are identical.
What is wrong?
J.
-
Hi,
Are you using the same version of PySide/PyQt on both OS ?