I need to read from the file the data in binary form - first several int , then uint8_t , then something else.
I'm trying to use QFile::read() instead of fread() , but it turns out somehow scary:
quint32 newNameLength; qint64 rCode = file.read(reinterpret_cast<char*>(&newNameLength), sizeof(quint32)); So generally you can do? If not, what is the most convenient analog for Qt for:
uint32_t newNameLength; size_t rCode = fread(&newNameLength, sizeof(uint32_t), 1, f); ?