How can I use Qt to read from a binary file to a structure? I'm trying to replace Foo foo; fread(foo,sizeof(FOO); I've tried QFile::read() but it wants a char buffer.