Format of the QDataStream operators
The QDataStream allows you to serialize some of the Qt data types.
The table below lists the data types that QDataStream can serialize.
- Q_INT8
- Q_INT16
- Q_INT32
- Q_UINT8
- Q_UINT16
- Q_UINT32
- float
- 32-bit floating point number using the standard IEEE-754 format
- double
- 64-bit floating point number using the standard IEEE-754 format
- char *
- The size of the string including the terminating 0 (Q_UINT32)
- The string including the terminating 0, i.e. length bytes
- QBrush
- The brush style (Q_UINT8)
- The brush color (QColor)
- If style == CustomPattern, the brush pixmap (QPixmap)
- QColor
- RGB value serialized as a Q_UINT32
- QCursor
- Shape id (Q_INT16)
- If shape == BitmapCursor, bitmap (QPixmap)
- If shape == BitmapCursor, mask (QPixmap)
- If shape == BitmapCursor, hot spot (QPoint)
- QFont
- The point size (Q_INT16)
- The style hint (Q_UINT8)
- The char set (Q_UINT8)
- The weight (Q_UINT8)
- The font bits (Q_UINT8)
- QImage
- QColorGroup
- foreground (QBrush)
- button (QBrush)
- light (QBrush)
- midLight (QBrush)
- dark (QBrush)
- mid (QBrush)
- text (QBrush)
- brightText (QBrush)
- ButtonText (QBrush)
- base (QBrush)
- background (QBrush)
- shadow (QBrush)
- highlight (QBrush)
- highlightedText (QBrush)
- QPalette
- active (QColorGroup)
- disabled (QColorGroup)
- inactive (QColorGroup)
- QPen
- The pen styles (Q_UINT8)
- The pen width (Q_UINT8)
- The pen color (QColor)
- QPicture
- QPixmap
- QPoint
- The x coordinate (Q_INT32)
- The y coordinate (Q_INT32)
- QPointArray
- The array size (Q_UINT32)
- The array points (QPoint)
- QRect
- left (Q_INT32)
- top (Q_INT32)
- right (Q_INT32)
- bottom (Q_INT32)
- QRegion
- The size of the data, i.e. 8 + 16 * (number of rectangles) (Q_UINT32)
- QRGN_RECTS (Q_INT32)
- The number of rectangles (Q_UINT32)
- The rectangles in sequential order (QRect)
- QSize
- width (Q_INT32)
- height (Q_INT32)
- QVariant
- The type of the data (Q_UINT32)
- The data of the specified type
- QWMatrix
- m11 (double)
- m12 (double)
- m21 (double)
- m22 (double)
- dx (double)
- dy (double)
- QBitArray
- The array size (Q_UINT32)
- The array bits, i.e. (size + 7)/8 bytes
- QByteArray
- The array size (Q_UINT32)
- The array bytes, i.e. size bytes
- QCString
- The length (Q_UINT32)
- The data, i.e. length bytes
- QDate
- QTime
- Milliseconds since midnight (Q_UINT32)
- QDateTime
- Date (QDate)
- Time (QTime)
- QMap
- The number of items (Q_UINT32)
- For all items, the key and value
- QString
- If the string is null: 0xffffffff (Q_UINT32)
- Otherwise: The string length (Q_UINT32) followed by the
data in UTF-16
- QValueList
- The number of list elements (Q_UINT32)
- All the elements in sequential order
Copyright © 2001 Trolltech | Trademarks
| Qt version 3.0.0-beta2
|