Solved Translations not working after deployment
-
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.