rz
15th April 2014, 15:12
I Use QTcpServer to read QbyteArray
while ( client->bytesAvailable() > 0) {
buffer += client->readAll();
}
this code above work fine
but i need convert this data to QString
I receive this "|\0000\0000\0001\000|\000|\0009\0009\0009\000|\000" (bin data) use QString line = QString::fromAscii(buffer,buffer.size()); or QString line = QString::fromUTF8(buffer,buffer.size());
bu i Need transparent value like
this
|001||999|
how can I do it ?
while ( client->bytesAvailable() > 0) {
buffer += client->readAll();
}
this code above work fine
but i need convert this data to QString
I receive this "|\0000\0000\0001\000|\000|\0009\0009\0009\000|\000" (bin data) use QString line = QString::fromAscii(buffer,buffer.size()); or QString line = QString::fromUTF8(buffer,buffer.size());
bu i Need transparent value like
this
|001||999|
how can I do it ?