Skip to content
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Qt 6.12 LTS is out! See what's new in the release blog
  • 0 Votes
    2 Posts
    3k Views
    A
    I am not sure I completely understand the problem since I do not see any structure in your read/write code. But normal way to deal with structures (the same as with classes) is to write/read every member separate in their natural form with provided by QDataStream functionality. And you certainly need to know type of the data written to the file to read it properly. Your problem (as far as I can understand) is related to using wrong function to read integer data, cause you read it as char data,