【发布时间】:2020-04-15 06:19:24
【问题描述】:
在给定的代码中,我首先在流中插入 1 个数字,然后将该值放入名为 Variable 的测试中。
当我打印变量时,我得到的输出是 0 而不是 1。
这是代码。
QByteArray data;
QDataStream stream(&data, QIODevice::ReadWrite);
stream << 1;
int test;
stream >> test;
qDebug() << test;
【问题讨论】:
标签: qt qt5 qdatastream