0

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.

user3540983
  • 141
  • 1
  • 4
  • 11

1 Answers1

1

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;