myTextCodec = QTextCodec::codecForName("Windows-1251"); QTextCodec::setCodecForLocale( myTextCodec ); QTextCodec::setCodecForTr( myTextCodec ); QTextCodec::setCodecForCStrings( myTextCodec );