Serializing Qt Data Types
The QDataStream class allows you to serialize the Qt data types listed in this section.
It is always best to cast integers to a Qt integer type, such as qint16 or quint32, 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 *
- QBitArray
- QBrush
- QByteArray
- QColor
- QCursor
- QDate
- QDateTime
- QEasingCurve
- QFont
- QGenericMatrix
- QHash<Key, T>
- QIcon
- QImage
- QKeySequence
- QList<T>
- QMap<Key, T>
- QMargins
- QMatrix4x4
- QPair<T1, T2>
- QPalette
- QPen
- QPicture
- QPixmap
- QPoint
- QQuaternion
- QRect
- QRegularExpression
- QRegion
- QSize
- QString
- QTime
- QTransform
- QUrl
- QVariant
- QVector2D
- QVector3D
- QVector4D
See also JSON Support in Qt and CBOR Support in Qt.
© 2023 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.