Solved Translations not working after deployment
-
@hbatalha said in Translations not working after deployment:
I thought that all the files in the resource file are compiled into the .exe but it is not happening with the .qm file as all the other files added in the resource seem to be working fine.
Please show us your QTranslator::load() call. You most likely need to tweak it to actually load the .qm file's content from the resource system...
-
Please show us your QTranslator::load() call.
if( ! translatorPt.load(":/Languages/transl_portuguese.qm")) qDebug() << "not loaded";
-
@hbatalha
due, for the 3rd timetranslatorPt.load("transl_portuguese.qm", ":/Languages"))
-
@J-Hilk I supected that was what he meant so I tried that but didn't work also.
-
@hbatalha
check out this thread
https://forum.qt.io/topic/74995/load-qm-file-from-resource/15the op never responded after a couple of solution suggestions, I assume one of them works 🤷♂️
-
I have found out what was the problem. For some reason I don't know every time I build the application Qt Creator will create the binary in the debug folder even though I have it set to release.
None of the changes I was making was actually taking effect since I was always checking .exe file from the release which was remaining unchanged the whole time.
So I took the .exe from the debug folder and deployed it and all is working fine. Now I have to check what might me going when building my app cause the .exe is pretty big and I am not sure if is the release or the debug(it is in the debug folder, but I built it with release build set).
I thank you all for the time and patience. I really appreciated it.
-
Any chances you are on Windows ?
-
-
Using Visual Studio ?
-
@SGaist No, Qt Creator
-
I mean the compiler.
-
@SGaist oh, it is mingw64 from msys2.