Translations not working after deployment
-
Please show us your QTranslator::load() call.
if( ! translatorPt.load(":/Languages/transl_portuguese.qm")) qDebug() << "not loaded";
-
@J-Hilk said in Check for QTranslator::load:
@hbatalha
what @nagesh meant is:translatorPt.load("transl_portuguese.qm", ":/Languages/"))
file path is now your qrc system and not currentPath
-
@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 ?
-
I mean the compiler.