How to go about serializing a large, complex object?
问题 I have a " User " class with 40+ private variables including complex objects like private/public keys (QCA library), custom QObjects etc. The idea is that the class has a function called sign() which encrypts, signs, serializes itself and returns a QByteArray which can then be stored in a SQLite blob. What's the best approach to serialize a complex object? Iterating though the properties with QMetaObject ? Converting it to a protobuf object? Could it be casted to a char array? 回答1: Could it