QT学习之QString和QByteArray转换

    
QString s;
QByteArray data(s.toUtf8());

client->write(data);
原文地址:https://www.cnblogs.com/qixianyu/p/6894576.html