0

我想从简单的 C++ 的 fgetc 之类的文本文件中读取,但使用 QT QTextStream 我尝试了 readall 方法,但它跳过了最后一个字符,这可能是一个中断。

4

1 回答 1

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;
于 2015-03-10T14:45:35.057 回答