Читайте справку.Используя setCodecForCStrings мы задаем кодек который будет использован у QString.
The QString class provides a Unicode character string.QString stores a string of 16-bit QChars, where each QChar corresponds one Unicode 4.0 character. (Unicode characters with code values above 65535 are stored using surrogate pairs, i.e., two consecutive QChars.)