I tried to read the file line by line using
while (file.canReadLine()) {
QString line = QString::fromUtf8(file.readLine());
qDebug() << line;
}
but it QFile::canReadLine()always returns false, although it file.readLine()succeeds and reads the next line every time it calls (I tested this).
Is it supposed to always return false? The docs say it always returns false for unbuffered devices , but doesn't support QFile?
I am using Qt 4.7.4.
source
share