I need to create a simple web service (being the \"server\"). The goal is to provide some data I do read in an Qt / C++ application as JSON data. Basically a Ja
QByteArray ba = dp.toLocal8Bit(); const char *baChar = ba.data();
You don't need to convert the QByteArray to char array. Response.write() can also be called with a QByteArray.
QByteArray
Response.write()
By the way: qPrintable(dp) is a shortcut to convert from QString to char array.
qPrintable(dp)
QString