Hi Mike,
I didn't dig deeply into your problem (as it requires heavyweight Qt building environment) but here are my $0.02: line-terminating character, not a separator. Btw, it's also sometimes
a buffer-flushing character, so I won't be surprised if your line stays unflushed inside QTextStream (and it's obvious that file.close() doesn't know about QTextStream objects that refer to its QFile and cannot forcibly grab data from them, so one have to output newlines or use some flush method).
I've tried to google("QTextStream buffering") and the second returned page looks like the proof of my idea: http://stackoverflow.com/questions/10370630/qtextstream-is-not-outputting-an...