PDA

View Full Version : fgets() analog in Qt



tommy
27th March 2009, 23:32
I'd like to read an entire line from a text file and dump it into a QString.
How do you read entire line (including empty spaces) with Qt. In normal C, I would use fgets(), but what is the fgets() analog in Qt?

wysota
27th March 2009, 23:45
QIODevice::readLine() (QFile is a QIODevice).