I'd have sworn this code was working at one point, but now doesn't seem to. Bits written to the file seem to end up in a bit bucket somewhere.
logFile = QSharedPointer<QFile>(new QFile(QString::fromAscii("FlightRecorder.log")));
logFile ->setPermissions(QFile::ReadOwner | QFile::WriteOwner | QFile::ReadUser | QFile::WriteUser | QFile::ReadOther);
logFile ->open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text | QIODevice::Unbuffered);