What's the best way to hash a file with QT?

I'm looking at QCryptographicHash, but the only inputs it takes are either char* or QByteArray.

Someone in another thread claims they managed to get this to calculate an MD5 on a file by passing in a path, but I'm not seeing that behavior:
http://www.qtcentre.org/threads/2266...-make-md5-hash

I could read in a QFile, and convert it to a QByteArray with readAll(), but that takes up as much memory as the size of the file. Is there a more memory efficient way to do this?