Thanks for your reply...
I agree that may be my code is not the best practice, as i learn Qt by myself only with doc and tutorials... but the program was working perfectly when i delivered it to the researchers... In fact, is working perfectly if i compile it on windows... few hour ago i borrowed a windows machine, installed qt, compiled the same project and worked just fine... So i doubt is really a code problem, because it should appear in both Windows and Linux, as the code is exactly the same...
I'm starting to think that is a linux driver problem, so i will try in another linux when i get the chance...
If someone has ubuntu 15.04 and is kind enough to reproduce this problem and tell me i would be very happy!
If anybody else reproduce this problem in other linux machine i will start a bug report
Just for an iteration the code reads line by line. As long as the search text is found, it will provide the remainder of the line. There is real dependency to the content as long as it is displayble (probably also some non-displayable characters). There are some special characters marking the end of lines (line feed (LF) and carriage return (CR) are those at least).
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.