The QDataStream allows you to serialize some of the Qt data types. The table below lists the data types that QDataStream can serialize and how they are represented. The format described below is version 12.
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 |
|
QHash<Key, T> |
|
QIcon | |
QImage | |
QKeySequence |
|
QLinkedList<T> |
|
QList<T> |
|
QMap<Key, T> |
|
QMatrix(obsolete) |
|
QMatrix4x4 |
|
QPair<T1, T2> |
|
QPalette | The disabled, active, and inactive color groups, each of which consists of the following: |
QPen |
|
QPicture |
|
QPixmap |
|
QPoint |
|
QQuaternion |
|
QRect |
|
QRegExp |
|
QRegion |
|
QSize |
|
QString |
|
QTime |
|
QTransform |
|
QUrl |
|
QVariant |
|
QVector2D |
|
QVector3D |
|
QVector4D |
|
QVector<T> |
|
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.