Search code examples
memoryiobuffering

Basic I/O in Qt


I would like to read/write into memory the same way I would write into a file (with a datastream). I couldn't find a suitable class for this, but I'm sure it exists. What is the name of such a class in the Qt framework?


Solution

  • Check out the classes that inherit from QIODevice.

    http://doc.qt.nokia.com/latest/qiodevice.html

    I'm not 100% clear on what you want, but chances are it is there. For instance, it sounds like you want a QBuffer but if you're talking about writing to shared memory at the OS level, then this isn't the same.