QByteArray to QString
QByteArray to QString:
Click this link to get more information. QTextCodec
QString DataAsString = QTextCodec::codecForMib(1015)->toUnicode(Data);
1015 is UTF-16, 1014 UTF-16LE, 1013 UTF-16BE, 106 UTF-8
The string “test” is encoded as “t\0 e\0 s\0 t\0 \0 \0” in the encoding and every ascii character is followed by a \0-byte, or ascii character is encoded as 2 bytes. The only unicode encoding in which ascii letters are encoded in the same way are UTF-16 or UCS-2 which is a secured version of UTF-16, in the case of 1015 mib to assume the local input endless.