序列化 Qt 數據類型

The QDataStream class allows you to serialize the Qt data types listed in this section as of version 18 .

始終最好將整數鑄造成 Qt 整數類型,譬如 qint16 or quint32 ,當讀/寫時。這確保無論應用程序發生運行在什麼底層平颱和體係結構中,始終準確知道正在讀/寫的整數的大小。

另請參閱 在 Qt 中支持 JSON .