int main(int argc, char *argv[]){ QApplication application( argc, argv); QTextCodec::setCodecForTr(QTextCodec::codecForName("Windows-1251")); QTextCodec::setCodecForCStrings(QTextCodec::codecForName("Windows-1251")); QTranslator *qt_translator = new QTranslator; if ( qt_translator->load( ":tr/qt_ru.qm" ) ) { application.installTranslator( qt_translator ); } ...}
<RCC> <qresource prefix="/tr" > <file>qt_ru.qm</file> </qresource></RCC>
QTextCodec::setCodecForTr(QTextCodec::codecForName("Windows-1251"));QTextCodec::setCodecForCStrings(QTextCodec::codecForName("Windows-1251"));