How can I write a QList into a binary file since the QDataStream.operator<<() and QDataStream.operator>>() have no corresponding overload in which I can pass in a QList.

In the application I am writing, there is a Patient class which I have a QList of and I want to read it from a binary file at startup and manipulate it throughout the execution, then at the end, write it back into the same file.

Any advice?