D'oh. That's what I get for not reading documentation. The QTextStream's QString* and QString& constructors construct a string stream, although I would think a stringstream would have so little in common with a file stream that it would need its own class.