What do you not understand exactly? In the example they don't use QTextStream::readLine(), they use QFile::readLine(), which is inherited from QIODevice. The difference is that QTextStream::readLine() returns a QString and QFile::readLine() returns a qint64 (QByteArray in the example), but I don't know anything about qint64 or QByteArrays, so I'll stick with QTextStrem::readLine()