Which class is more efficient to read the data from text file ?
General and Desktop
4
Posts
2
Posters
2.4k
Views
1
Watching
-
Please read the "documentation":http://doc.qt.nokia.com/4.7/qtextstream.html#details:
bq. There are three general ways to use QTextStream when reading text files:
Chunk by chunk, by calling readLine() or readAll().
Word by word. QTextStream supports streaming into QStrings, QByteArrays and char* buffers. Words are delimited by space, and leading white space is automatically skipped.
Character by character, by streaming into QChar or char types. This method is often used for convenient input handling when parsing files, independent of character encoding and end-of-line semantics. To skip white space, call skipWhiteSpace().