当前位置: 代码迷 >> QT开发 >> 请问一个QByteArray的有关问题
  详细解决方案

请问一个QByteArray的有关问题

热度:95   发布时间:2016-04-25 05:00:11.0
请教一个QByteArray的问题
QDataStream sendOut(&outBlock, QIODevice::WriteOnly);
QString currentFileName = fileName.right(fileName.size() - fileName.lastIndexOf('/') - 1);
sendOut << qint64(0) << qint64(0) << currentFileName;
这里outBlock的大小是怎么算的?

------解决方案--------------------
outBlock.length()或outBlock.size()
------解决方案--------------------
outBlock.count()
outBlock.size()
outBlock.length()

三者其实差不多。