What just happened?

We provided two standalone functions that define redirection operators for the Player class to and from a QDataStream instance. This lets your class be serialized and deserialized using mechanisms offered and used by Qt.

Get Game Programming using Qt 5 Beginner's Guide - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.