Logo Search packages:      
Sourcecode: qt4-x11 version File versions

void QDataStream::setVersion ( int  v  )  [inline]

Sets the version number of the data serialization format to v.

You don't have to set a version if you are using the current version of Qt, but for your own custom binary formats we recommend that you do; see {Versioning} in the Detailed Description.

In order to accommodate new functionality, the datastream serialization format of some Qt classes has changed in some versions of Qt. If you want to read data that was created by an earlier version of Qt, or write data that can be read by a program that was compiled with an earlier version of Qt, use this function to modify the serialization format used by QDataStream.

Qt Version QDataStream Version Qt 4.4 10 Qt 4.3 9 Qt 4.2 8 Qt 4.0, 4.1 7 Qt 3.3 6 Qt 3.1, 3.2 5 Qt 3.0 4 Qt 2.1, 2.2, 2.3 3 Qt 2.0 2 Qt 1.x 1

The Version enum provides symbolic constants for the different versions of Qt. For example:

doc/src/snippets/code/src_corelib_io_qdatastream.cpp 5

See also:
version(), Version

Definition at line 203 of file qdatastream.h.

Referenced by AddressBook::loadFromFile(), QPicture::play(), Client::readFortune(), QWidget::restoreGeometry(), FortuneThread::run(), QWidget::saveGeometry(), AddressBook::saveToFile(), and Server::sendFortune().

{ ver = v; }

Generated by  Doxygen 1.6.0   Back to index