List of data types that can be serialized by
QDataStream.
QDataStreamclass allows you to serialize the Qt data types listed in this section as ofversion 18.It is always best to cast integers to a Qt integer type, such as
qint16orquint32, when reading and writing. This ensures that you always know exactly what size integers you are reading and writing, no matter what the underlying platform and architecture the application happens to be running on.
bool
qint8
qint16
qint32
qint64
quint8
quint16
quint32
quint64
float
double
const char *
QGenericMatrix
QHash<Key, T>
QLinkedList<T>
QList<T>
QMap<Key, T>
QPair<T1, T2>
QString
QVariant
QVector<T>另请参阅
在 Qt 中支持 JSON