QTranslator the translator;
Bool ok=the translator. The load (" :/qm/0 ");
QFileInfo file (" :/qm/0 ");
QDebug () & lt;
{
QDebug () & lt; & lt;" File not loaded ";
}
The output is
True
File not load
Among them ":/qm/0" is the byname of resource file
CodePudding user response:
QTranslator the translator;
The translator. The load (" :/res/language/WMagicMediaPlus_zh_CN qm ");
Anderson nstallTranslator (& amp; The translator);