Is there any way to create a data stream that is located at the beginning of a memory mapped file in Qt?
Once i use QFile::map
method, i get a uchar*
. So is there any way to initialize a data stream with it? Thanks in advance!
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I've not tried it but there's a QDataStream::readRawData()
function that accepts a char *
and a length which you should be able to pipe that uchar *
into. That'll give you your stream.