Never mind, problem is solved: There was an extra newline character in the last field of my data. Apparently, unlike calling std::getline(), calling QIODevice::readLine() on the file does not strip out the NL character automatically (yes, I discovered this in the docs for QIODevice later).