Another solution: Store all your data as key-value pairs in QMap<QString, QVariant> and write it to QDataStream. Next, applications will read full QMap contents from stream, then access needed values by their names.
Ok guy thank you for that much replies :P! I solved the issue by myself anyway. In case sombebody has a similar problem here comes the solution:
What I did wrong was that I connected a time consuming function to the UpdateClient::tcpReady() slot. In this function I did some stuff which also lead to the emission of UpdateClient::tcpReady(). This broke the QEventQueue. So to what I had to chance was to skip the direct signal slot connection an do this in the UpdateClient::tcpReady():
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,
Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.