Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

Clearing existing file

$
0
0
Hi guys, Maybe just a trivial question, but I have to write some data to a file (and off course open it again later on). The problem I encounter is that when the file already exists the “old” data in the file will stay there when the new data (that overwrites this) is shorter then the old data. In QFile the only thing I could find is QFile.resize(0); I’m using a QTextStream to fill the data in the file. Are there any better ways of doing this? It does work, but IYAM it’s not real pretty, or is it? Greetz

Viewing all articles
Browse latest Browse all 18427

Trending Articles