Reputation: 141
I want to read from a text file like simple C++'s fgetc but with QT QTextStream where I tried readall method but it skip the last characther which probably is a break.
Upvotes: 0
Views: 3795
Reputation: 128
You can use read method and set max number of characters for reading.
QString oneChar = stream.read(1);
or can use overload operator >> for QChar. Something like this
QChar oneChar = '';
stream >> oneChar;
Upvotes: 1